]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ceph: set user pages dirty after direct IO read
authorYan, Zheng <zyan@redhat.com>
Thu, 26 May 2016 02:30:13 +0000 (10:30 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 28 Jul 2016 00:55:38 +0000 (02:55 +0200)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/file.c

index cba5dcf49a65bfc2904fad2718da9deb3000e2b5..ac75fa9fd858f01a3f568e2a672db1cd64791bdc 100644 (file)
@@ -708,7 +708,7 @@ static void ceph_aio_complete_req(struct ceph_osd_request *req)
                }
        }
 
-       ceph_put_page_vector(osd_data->pages, num_pages, false);
+       ceph_put_page_vector(osd_data->pages, num_pages, !aio_req->write);
        ceph_osdc_put_request(req);
 
        if (rc < 0)
@@ -964,7 +964,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter,
                                len = ret;
                }
 
-               ceph_put_page_vector(pages, num_pages, false);
+               ceph_put_page_vector(pages, num_pages, !write);
 
                ceph_osdc_put_request(req);
                if (ret < 0)