Commit e98b6fed authored by Sage Weil's avatar Sage Weil

ceph: fix comment, remove extraneous args

The offset/length arguments aren't used.
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent d8672d64
......@@ -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);
/*
* flush any page cache pages in this range. this
* will make concurrent normal and O_DIRECT io slow,
* but it will at least behave sensibly when they are
* in sequence.
*/
} else {
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 sync io slow,
* but it will at least behave sensibly when they are
* in sequence.
*/
ret = filemap_write_and_wait(inode->i_mapping);
if (ret < 0)
goto done;
......
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment