]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: check file ranges before cloning files
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 29 Oct 2018 23:40:31 +0000 (10:40 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 29 Oct 2018 23:40:31 +0000 (10:40 +1100)
commit5dc995ea29d26f78743207449972fe7a542dd543
tree048373f94325388a84358370707718d5c15366a6
parentcfe5453108619e494760a982c5c503c3c222ab65
vfs: check file ranges before cloning files

Move the file range checks from vfs_clone_file_prep into a separate
generic_remap_checks function so that all the checks are collected in a
central location.  This forms the basis for adding more checks from
generic_write_checks that will make cloning's input checking more
consistent with write input checking.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/ocfs2/refcounttree.c
fs/read_write.c
fs/xfs/xfs_reflink.c
include/linux/fs.h
mm/filemap.c