Skip to content

Commit e98b6fe

Browse files
committed
ceph: fix comment, remove extraneous args
The offset/length arguments aren't used. Signed-off-by: Sage Weil <sage@newdream.net>
1 parent d8672d6 commit e98b6fe

3 files changed

Lines changed: 11 additions & 15 deletions

File tree

‎fs/ceph/file.c‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -376,21 +376,19 @@ static ssize_t ceph_sync_read(struct file *file, char __user *data,
376376
dout("sync_read on file %p %llu~%u %s\n", file, off, len,
377377
(file->f_flags & O_DIRECT) ? "O_DIRECT" : "");
378378

379-
if (file->f_flags & O_DIRECT) {
380-
pages = ceph_get_direct_page_vector(data, num_pages, off, len);
381-
382-
/*
383-
* flush any page cache pages in this range. this
384-
* will make concurrent normal and O_DIRECT io slow,
385-
* but it will at least behave sensibly when they are
386-
* in sequence.
387-
*/
388-
} else {
379+
if (file->f_flags & O_DIRECT)
380+
pages = ceph_get_direct_page_vector(data, num_pages);
381+
else
389382
pages = ceph_alloc_page_vector(num_pages, GFP_NOFS);
390-
}
391383
if (IS_ERR(pages))
392384
return PTR_ERR(pages);
393385

386+
/*
387+
* flush any page cache pages in this range. this
388+
* will make concurrent normal and sync io slow,
389+
* but it will at least behave sensibly when they are
390+
* in sequence.
391+
*/
394392
ret = filemap_write_and_wait(inode->i_mapping);
395393
if (ret < 0)
396394
goto done;

‎include/linux/ceph/libceph.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,7 @@ extern int ceph_open_session(struct ceph_client *client);
227227
extern void ceph_release_page_vector(struct page **pages, int num_pages);
228228

229229
extern struct page **ceph_get_direct_page_vector(const char __user *data,
230-
int num_pages,
231-
loff_t off, size_t len);
230+
int num_pages);
232231
extern void ceph_put_page_vector(struct page **pages, int num_pages);
233232
extern void ceph_release_page_vector(struct page **pages, int num_pages);
234233
extern struct page **ceph_alloc_page_vector(int num_pages, gfp_t flags);

‎net/ceph/pagevec.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
* build a vector of user pages
1414
*/
1515
struct page **ceph_get_direct_page_vector(const char __user *data,
16-
int num_pages,
17-
loff_t off, size_t len)
16+
int num_pages)
1817
{
1918
struct page **pages;
2019
int rc;

0 commit comments

Comments
 (0)