aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-11-09 12:24:53 -0800
committerSage Weil <sage@newdream.net>2010-11-09 12:24:53 -0800
commite98b6fed84d0f0155d7b398e0dfeac74c792f2d0 (patch)
tree0762cba398c39329dc5f056ddfccebf6768d2555
parentd8672d64b88cdb7aa8139fb6d218f40b8cbf60af (diff)
downloadmrst-s0i3-test-e98b6fed84d0f0155d7b398e0dfeac74c792f2d0.tar.gz
mrst-s0i3-test-e98b6fed84d0f0155d7b398e0dfeac74c792f2d0.tar.xz
mrst-s0i3-test-e98b6fed84d0f0155d7b398e0dfeac74c792f2d0.zip
ceph: fix comment, remove extraneous args
The offset/length arguments aren't used. Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r--fs/ceph/file.c20
-rw-r--r--include/linux/ceph/libceph.h3
-rw-r--r--net/ceph/pagevec.c3
3 files changed, 11 insertions, 15 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 87ee944724f..603fd00af0a 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -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;
diff --git a/include/linux/ceph/libceph.h b/include/linux/ceph/libceph.h
index f22b2e94168..9e76d35670d 100644
--- a/include/linux/ceph/libceph.h
+++ b/include/linux/ceph/libceph.h
@@ -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);
diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c
index 54caf068715..ac34feeb2b3 100644
--- a/net/ceph/pagevec.c
+++ b/net/ceph/pagevec.c
@@ -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;