Skip to content

Commit

Permalink
ceph: fix comment, remove extraneous args
Browse files Browse the repository at this point in the history
The offset/length arguments aren't used.

Signed-off-by: Sage Weil <sage@newdream.net>
  • Loading branch information
Sage Weil committed Nov 9, 2010
1 parent d8672d6 commit e98b6fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
20 changes: 9 additions & 11 deletions fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions include/linux/ceph/libceph.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions net/ceph/pagevec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e98b6fe

Please sign in to comment.