summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-03 15:09:18 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-11 22:29:38 -0400
commit3d04c8a17f1a0041a6851cf64f3da8c40deed837 (patch)
tree611e8dc9c553d01cfe7748b7c75f174096d80930 /fs
parenta35fb914ae62a58ca7519778fffac722c6ae255f (diff)
export __vfs_read()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/read_write.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index 9d7952a6829b..c75e6ef0952c 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -450,19 +450,16 @@ EXPORT_SYMBOL(new_sync_read);
450ssize_t __vfs_read(struct file *file, char __user *buf, size_t count, 450ssize_t __vfs_read(struct file *file, char __user *buf, size_t count,
451 loff_t *pos) 451 loff_t *pos)
452{ 452{
453 ssize_t ret;
454
455 if (file->f_op->read) 453 if (file->f_op->read)
456 ret = file->f_op->read(file, buf, count, pos); 454 return file->f_op->read(file, buf, count, pos);
457 else if (file->f_op->aio_read) 455 else if (file->f_op->aio_read)
458 ret = do_sync_read(file, buf, count, pos); 456 return do_sync_read(file, buf, count, pos);
459 else if (file->f_op->read_iter) 457 else if (file->f_op->read_iter)
460 ret = new_sync_read(file, buf, count, pos); 458 return new_sync_read(file, buf, count, pos);
461 else 459 else
462 ret = -EINVAL; 460 return -EINVAL;
463
464 return ret;
465} 461}
462EXPORT_SYMBOL(__vfs_read);
466 463
467ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) 464ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
468{ 465{