Commit b77d88d493b8fc7a4c2dadd3bb86d1dee2f53a56

Authored by Kirill A. Shutemov
Committed by Linus Torvalds
1 parent a0dce7f0ac

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>

Showing 1 changed file with 5 additions and 5 deletions Side-by-side Diff

... ... @@ -1090,7 +1090,6 @@
1090 1090 * @filp: the file to read
1091 1091 * @ppos: current file position
1092 1092 * @desc: read_descriptor
1093   - * @actor: read method
1094 1093 *
1095 1094 * This is a generic file read routine, and uses the
1096 1095 * mapping->a_ops->readpage() function for the actual low-level stuff.
... ... @@ -1099,7 +1098,7 @@
1099 1098 * of the logic when it comes to error handling etc.
1100 1099 */
1101 1100 static 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 1103 struct address_space *mapping = filp->f_mapping;
1105 1104 struct inode *inode = mapping->host;
1106 1105  
... ... @@ -1200,13 +1199,14 @@
1200 1199 * Ok, we have the page, and it's up-to-date, so
1201 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 1204 * NOTE! This may not be the same as how much of a user buffer
1205 1205 * we filled up (we may be padding etc), so we can only update
1206 1206 * "pos" here (the actor routine has to update the user buffer
1207 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 1210 offset += ret;
1211 1211 index += offset >> PAGE_CACHE_SHIFT;
1212 1212 offset &= ~PAGE_CACHE_MASK;
... ... @@ -1479,7 +1479,7 @@
1479 1479 if (desc.count == 0)
1480 1480 continue;
1481 1481 desc.error = 0;
1482   - do_generic_file_read(filp, ppos, &desc, file_read_actor);
  1482 + do_generic_file_read(filp, ppos, &desc);
1483 1483 retval += desc.written;
1484 1484 if (desc.error) {
1485 1485 retval = retval ?: desc.error;