summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2019-06-05 17:04:48 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2019-06-09 19:06:19 +0200
commita31713517dac0862a3f0ec9006df9160ce022b0c (patch)
tree020aa1dc2d4ad9c646a15c23f12f765271f459a7 /include
parentvfs: no fallback for ->copy_file_range (diff)
downloadlinux-a31713517dac0862a3f0ec9006df9160ce022b0c.tar.xz
linux-a31713517dac0862a3f0ec9006df9160ce022b0c.zip
vfs: introduce generic_file_rw_checks()
Factor out helper with some checks on in/out file that are common to clone_file_range and copy_file_range. Suggested-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ea17858310ff..89b9b73eb581 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3049,6 +3049,7 @@ extern ssize_t generic_write_checks(struct kiocb *, struct iov_iter *);
extern int generic_remap_checks(struct file *file_in, loff_t pos_in,
struct file *file_out, loff_t pos_out,
loff_t *count, unsigned int remap_flags);
+extern int generic_file_rw_checks(struct file *file_in, struct file *file_out);
extern ssize_t generic_file_read_iter(struct kiocb *, struct iov_iter *);
extern ssize_t __generic_file_write_iter(struct kiocb *, struct iov_iter *);
extern ssize_t generic_file_write_iter(struct kiocb *, struct iov_iter *);