]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: drop actor argument of do_shmem_file_read()
authorMatthew Wilcox <willy@linux.intel.com>
Thu, 18 Jul 2013 23:56:43 +0000 (09:56 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 18 Jul 2013 23:56:43 +0000 (09:56 +1000)
There's only one caller of do_shmem_file_read() and the only actor is
file_read_actor(). No reason to have a callback parameter.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Reviewed-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c

index a87990cf9f94019c70d7263d247c1c94945aee5b..eb6ff2f37de0b6586d4fc5e9cdb5479eda68c5dc 100644 (file)
@@ -1464,7 +1464,7 @@ shmem_write_end(struct file *file, struct address_space *mapping,
        return copied;
 }
 
-static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_t *desc, read_actor_t actor)
+static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_t *desc)
 {
        struct inode *inode = file_inode(filp);
        struct address_space *mapping = inode->i_mapping;
@@ -1546,13 +1546,14 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_
                 * 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
+                * "pos" here (file_read_actor 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;
@@ -1590,7 +1591,7 @@ static ssize_t shmem_file_aio_read(struct kiocb *iocb,
                if (desc.count == 0)
                        continue;
                desc.error = 0;
-               do_shmem_file_read(filp, ppos, &desc, file_read_actor);
+               do_shmem_file_read(filp, ppos, &desc);
                retval += desc.written;
                if (desc.error) {
                        retval = retval ?: desc.error;