Loading fs/ceph/file.c +9 −11 Original line number Diff line number Diff line Loading @@ -376,21 +376,19 @@ static ssize_t ceph_sync_read(struct file *file, char __user *data, dout("sync_read on file %p %llu~%u %s\n", file, off, len, (file->f_flags & O_DIRECT) ? "O_DIRECT" : ""); if (file->f_flags & O_DIRECT) { pages = ceph_get_direct_page_vector(data, num_pages, off, len); if (file->f_flags & O_DIRECT) pages = ceph_get_direct_page_vector(data, num_pages); else pages = ceph_alloc_page_vector(num_pages, GFP_NOFS); if (IS_ERR(pages)) return PTR_ERR(pages); /* * flush any page cache pages in this range. this * will make concurrent normal and O_DIRECT io slow, * will make concurrent normal and sync io slow, * but it will at least behave sensibly when they are * in sequence. */ } else { pages = ceph_alloc_page_vector(num_pages, GFP_NOFS); } if (IS_ERR(pages)) return PTR_ERR(pages); ret = filemap_write_and_wait(inode->i_mapping); if (ret < 0) goto done; Loading include/linux/ceph/libceph.h +1 −2 Original line number Diff line number Diff line Loading @@ -227,8 +227,7 @@ extern int ceph_open_session(struct ceph_client *client); extern void ceph_release_page_vector(struct page **pages, int num_pages); extern struct page **ceph_get_direct_page_vector(const char __user *data, int num_pages, loff_t off, size_t len); int num_pages); extern void ceph_put_page_vector(struct page **pages, int num_pages); extern void ceph_release_page_vector(struct page **pages, int num_pages); extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); Loading net/ceph/pagevec.c +1 −2 Original line number Diff line number Diff line Loading @@ -13,8 +13,7 @@ * build a vector of user pages */ struct page **ceph_get_direct_page_vector(const char __user *data, int num_pages, loff_t off, size_t len) int num_pages) { struct page **pages; int rc; Loading Loading
fs/ceph/file.c +9 −11 Original line number Diff line number Diff line Loading @@ -376,21 +376,19 @@ static ssize_t ceph_sync_read(struct file *file, char __user *data, dout("sync_read on file %p %llu~%u %s\n", file, off, len, (file->f_flags & O_DIRECT) ? "O_DIRECT" : ""); if (file->f_flags & O_DIRECT) { pages = ceph_get_direct_page_vector(data, num_pages, off, len); if (file->f_flags & O_DIRECT) pages = ceph_get_direct_page_vector(data, num_pages); else pages = ceph_alloc_page_vector(num_pages, GFP_NOFS); if (IS_ERR(pages)) return PTR_ERR(pages); /* * flush any page cache pages in this range. this * will make concurrent normal and O_DIRECT io slow, * will make concurrent normal and sync io slow, * but it will at least behave sensibly when they are * in sequence. */ } else { pages = ceph_alloc_page_vector(num_pages, GFP_NOFS); } if (IS_ERR(pages)) return PTR_ERR(pages); ret = filemap_write_and_wait(inode->i_mapping); if (ret < 0) goto done; Loading
include/linux/ceph/libceph.h +1 −2 Original line number Diff line number Diff line Loading @@ -227,8 +227,7 @@ extern int ceph_open_session(struct ceph_client *client); extern void ceph_release_page_vector(struct page **pages, int num_pages); extern struct page **ceph_get_direct_page_vector(const char __user *data, int num_pages, loff_t off, size_t len); int num_pages); extern void ceph_put_page_vector(struct page **pages, int num_pages); extern void ceph_release_page_vector(struct page **pages, int num_pages); extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags); Loading
net/ceph/pagevec.c +1 −2 Original line number Diff line number Diff line Loading @@ -13,8 +13,7 @@ * build a vector of user pages */ struct page **ceph_get_direct_page_vector(const char __user *data, int num_pages, loff_t off, size_t len) int num_pages) { struct page **pages; int rc; Loading