diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2013-09-27 10:19:55 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-09-27 18:02:20 +1000 |
commit | 81f80d7f6af4bc55a3474af29468f00e2d6822e6 (patch) | |
tree | 8b56d06e959252f9f0474931f6ffeda663088953 | |
parent | 34ffbca6936e73418d802680cf46048168bef7da (diff) |
mm: drop actor argument of do_generic_file_read()
There's only one caller of do_generic_file_read() and the only actor is
file_read_actor(). No reason to have a callback parameter.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | mm/filemap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index d99b21d01d5d..0a3fad084ab9 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -1092,7 +1092,6 @@ static void shrink_readahead_size_eio(struct file *filp, * @filp: the file to read * @ppos: current file position * @desc: read_descriptor - * @actor: read method * * This is a generic file read routine, and uses the * mapping->a_ops->readpage() function for the actual low-level stuff. @@ -1101,7 +1100,7 @@ static void shrink_readahead_size_eio(struct file *filp, * of the logic when it comes to error handling etc. */ static void do_generic_file_read(struct file *filp, loff_t *ppos, - read_descriptor_t *desc, read_actor_t actor) + read_descriptor_t *desc) { struct address_space *mapping = filp->f_mapping; struct inode *inode = mapping->host; @@ -1202,13 +1201,14 @@ page_ok: * Ok, we have the page, and it's up-to-date, so * now we can copy it to user space... * - * The actor routine returns how many bytes were actually used.. + * The file_read_actor routine returns how many bytes were + * actually used.. * NOTE! This may not be the same as how much of a user buffer * we filled up (we may be padding etc), so we can only update * "pos" here (the actor routine has to update the user buffer * pointers and the remaining count). */ - ret = actor(desc, page, offset, nr); + ret = file_read_actor(desc, page, offset, nr); offset += ret; index += offset >> PAGE_CACHE_SHIFT; offset &= ~PAGE_CACHE_MASK; @@ -1432,7 +1432,7 @@ generic_file_read_iter(struct kiocb *iocb, struct iov_iter *iter, loff_t pos) desc.arg.data = iter; desc.count = count; desc.error = 0; - do_generic_file_read(filp, ppos, &desc, file_read_iter_actor); + do_generic_file_read(filp, ppos, &desc); if (desc.written) retval = desc.written; else |