export __vfs_read()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 3 Apr 2015 19:09:18 +0000 (15:09 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Apr 2015 02:29:38 +0000 (22:29 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/read_write.c

index 9d7952a..c75e6ef 100644 (file)
@@ -450,19 +450,16 @@ EXPORT_SYMBOL(new_sync_read);
 ssize_t __vfs_read(struct file *file, char __user *buf, size_t count,
                   loff_t *pos)
 {
-       ssize_t ret;
-
        if (file->f_op->read)
-               ret = file->f_op->read(file, buf, count, pos);
+               return file->f_op->read(file, buf, count, pos);
        else if (file->f_op->aio_read)
-               ret = do_sync_read(file, buf, count, pos);
+               return do_sync_read(file, buf, count, pos);
        else if (file->f_op->read_iter)
-               ret = new_sync_read(file, buf, count, pos);
+               return new_sync_read(file, buf, count, pos);
        else
-               ret = -EINVAL;
-
-       return ret;
+               return -EINVAL;
 }
+EXPORT_SYMBOL(__vfs_read);
 
 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
 {