]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
vfs: introduce generic_copy_file_range()
authorDave Chinner <dchinner@redhat.com>
Wed, 5 Jun 2019 15:04:47 +0000 (08:04 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sun, 9 Jun 2019 17:06:18 +0000 (10:06 -0700)
commitf16acc9d9b3761ae5e45219c9302f99e20919829
treef209a6f178bd32ace2e72c47f2c575f9c6b8fdee
parentd1fdb6d8f6a4109a4263176c84b899076a5f8008
vfs: introduce generic_copy_file_range()

Right now if vfs_copy_file_range() does not use any offload
mechanism, it falls back to calling do_splice_direct(). This fails
to do basic sanity checks on the files being copied. Before we
start adding this necessarily functionality to the fallback path,
separate it out into generic_copy_file_range().

generic_copy_file_range() has the same prototype as
->copy_file_range() so that filesystems can use it in their custom
->copy_file_range() method if they so choose.

Signed-off-by: Dave Chinner <dchinner@redhat.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>
fs/read_write.c
include/linux/fs.h