aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2013-11-14 17:30:40 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-14 19:32:13 -0500
commitb77d88d493b8fc7a4c2dadd3bb86d1dee2f53a56 (patch)
treeb355bd23a7d2fc74db84b3e1180bf228a8257f48 /mm/filemap.c
parenta0dce7f0ac66cdd5b653a3b059eb1382c2bdf8a0 (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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index ae4846ff4849..b7749a92021c 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1090,7 +1090,6 @@ static void shrink_readahead_size_eio(struct file *filp,
1090 * @filp: the file to read 1090 * @filp: the file to read
1091 * @ppos: current file position 1091 * @ppos: current file position
1092 * @desc: read_descriptor 1092 * @desc: read_descriptor
1093 * @actor: read method
1094 * 1093 *
1095 * This is a generic file read routine, and uses the 1094 * This is a generic file read routine, and uses the
1096 * mapping->a_ops->readpage() function for the actual low-level stuff. 1095 * mapping->a_ops->readpage() function for the actual low-level stuff.
@@ -1099,7 +1098,7 @@ static void shrink_readahead_size_eio(struct file *filp,
1099 * of the logic when it comes to error handling etc. 1098 * of the logic when it comes to error handling etc.
1100 */ 1099 */
1101static void do_generic_file_read(struct file *filp, loff_t *ppos, 1100static void do_generic_file_read(struct file *filp, loff_t *ppos,
1102 read_descriptor_t *desc, read_actor_t actor) 1101 read_descriptor_t *desc)
1103{ 1102{
1104 struct address_space *mapping = filp->f_mapping; 1103 struct address_space *mapping = filp->f_mapping;
1105 struct inode *inode = mapping->host; 1104 struct inode *inode = mapping->host;
@@ -1200,13 +1199,14 @@ page_ok:
1200 * Ok, we have the page, and it's up-to-date, so 1199 * Ok, we have the page, and it's up-to-date, so
1201 * now we can copy it to user space... 1200 * now we can copy it to user space...
1202 * 1201 *
1203 * The actor routine returns how many bytes were actually used.. 1202 * The file_read_actor routine returns how many bytes were
1203 * actually used..
1204 * NOTE! This may not be the same as how much of a user buffer 1204 * NOTE! This may not be the same as how much of a user buffer
1205 * we filled up (we may be padding etc), so we can only update 1205 * we filled up (we may be padding etc), so we can only update
1206 * "pos" here (the actor routine has to update the user buffer 1206 * "pos" here (the actor routine has to update the user buffer
1207 * pointers and the remaining count). 1207 * pointers and the remaining count).
1208 */ 1208 */
1209 ret = actor(desc, page, offset, nr); 1209 ret = file_read_actor(desc, page, offset, nr);
1210 offset += ret; 1210 offset += ret;
1211 index += offset >> PAGE_CACHE_SHIFT; 1211 index += offset >> PAGE_CACHE_SHIFT;
1212 offset &= ~PAGE_CACHE_MASK; 1212 offset &= ~PAGE_CACHE_MASK;
@@ -1479,7 +1479,7 @@ generic_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
1479 if (desc.count == 0) 1479 if (desc.count == 0)
1480 continue; 1480 continue;
1481 desc.error = 0; 1481 desc.error = 0;
1482 do_generic_file_read(filp, ppos, &desc, file_read_actor); 1482 do_generic_file_read(filp, ppos, &desc);
1483 retval += desc.written; 1483 retval += desc.written;
1484 if (desc.error) { 1484 if (desc.error) {
1485 retval = retval ?: desc.error; 1485 retval = retval ?: desc.error;