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>
Showing
- fs/ocfs2/refcounttree.c 1 addition, 1 deletionfs/ocfs2/refcounttree.c
- fs/read_write.c 13 additions, 42 deletionsfs/read_write.c
- fs/xfs/xfs_reflink.c 1 addition, 1 deletionfs/xfs/xfs_reflink.c
- include/linux/fs.h 6 additions, 3 deletionsinclude/linux/fs.h
- mm/filemap.c 69 additions, 0 deletionsmm/filemap.c
Loading