Skip to content

Commit

Permalink
do_shmem_file_read(): call file_read_actor() directly
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Apr 2, 2014
1 parent 9e8c2af commit 8142c18
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,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;
Expand Down Expand Up @@ -1550,7 +1550,7 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_
* "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;
Expand Down Expand Up @@ -1588,7 +1588,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;
Expand Down

0 comments on commit 8142c18

Please sign in to comment.