Merge tag 'copy-file-range-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull copy_file_range updates from Darrick Wong: "This fixes numerous parameter checking problems and inconsistent behaviors in the new(ish) copy_file_range system call. Now the system call will actually check its range parameters correctly; refuse to copy into files for which the caller does not have sufficient privileges; update mtime and strip setuid like file writes are supposed to do; and allows copying up to the EOF of the source file instead of failing the call like we used to. Summary: - Create a generic copy_file_range handler and make individual filesystems responsible for calling it (i.e. no more assuming that do_splice_direct will work or is appropriate) - Refactor copy_file_range and remap_range parameter checking where they are the same - Install missing copy_file_range parameter checking(!) - Remove suid/sgid and update mtime like any other file write - Change the behavior so that a copy range crossing the source file's eof will result in a short copy to the source file's eof instead of EINVAL - Permit filesystems to decide if they want to handle cross-superblock copy_file_range in their local handlers" * tag 'copy-file-range-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: fuse: copy_file_range needs to strip setuid bits and update timestamps vfs: allow copy_file_range to copy across devices xfs: use file_modified() helper vfs: introduce file_modified() helper vfs: add missing checks to copy_file_range vfs: remove redundant checks from generic_remap_checks() vfs: introduce generic_file_rw_checks() vfs: no fallback for ->copy_file_range vfs: introduce generic_copy_file_range()
No related branches found
No related tags found
Showing
- fs/ceph/file.c 20 additions, 3 deletionsfs/ceph/file.c
- fs/cifs/cifsfs.c 4 additions, 0 deletionsfs/cifs/cifsfs.c
- fs/fuse/file.c 26 additions, 3 deletionsfs/fuse/file.c
- fs/inode.c 20 additions, 0 deletionsfs/inode.c
- fs/nfs/nfs4file.c 20 additions, 3 deletionsfs/nfs/nfs4file.c
- fs/read_write.c 68 additions, 56 deletionsfs/read_write.c
- fs/xfs/xfs_file.c 1 addition, 14 deletionsfs/xfs/xfs_file.c
- include/linux/fs.h 9 additions, 0 deletionsinclude/linux/fs.h
- mm/filemap.c 89 additions, 21 deletionsmm/filemap.c
Loading
Please register or sign in to comment