summaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2017-02-20 10:51:23 -0500
committerMiklos Szeredi <mszeredi@redhat.com>2017-02-20 10:51:23 -0500
commitbb7462b6fd64e40809a857223bf7f0e628969f87 (patch)
treeaa3ac0570ca67c85f0c7a3658c970716135ac1c0 /include/linux/fs.h
parent0f78d06ac1e9b470cbd8f913ee1688c8b2c8feb3 (diff)
vfs: use helpers for calling f_op->{read,write}_iter()
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 78c81e6f5d76..a3145cdff8f2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1715,6 +1715,18 @@ struct inode_operations {
1715 int (*set_acl)(struct inode *, struct posix_acl *, int); 1715 int (*set_acl)(struct inode *, struct posix_acl *, int);
1716} ____cacheline_aligned; 1716} ____cacheline_aligned;
1717 1717
1718static inline ssize_t call_read_iter(struct file *file, struct kiocb *kio,
1719 struct iov_iter *iter)
1720{
1721 return file->f_op->read_iter(kio, iter);
1722}
1723
1724static inline ssize_t call_write_iter(struct file *file, struct kiocb *kio,
1725 struct iov_iter *iter)
1726{
1727 return file->f_op->write_iter(kio, iter);
1728}
1729
1718ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector, 1730ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
1719 unsigned long nr_segs, unsigned long fast_segs, 1731 unsigned long nr_segs, unsigned long fast_segs,
1720 struct iovec *fast_pointer, 1732 struct iovec *fast_pointer,