]> git.baikalelectronics.ru Git - 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)
commit816cdaaadbf61a4b1a59d1d82ee1edd04aec2fcb
treef209a6f178bd32ace2e72c47f2c575f9c6b8fdee
parent25a870e61f38956973b8275648b66863adc19482
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