]> 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)
commit988da1c4cd49b8e8733d83c2a435be0025420b78
treef209a6f178bd32ace2e72c47f2c575f9c6b8fdee
parent3eca66e94acbfb78f14c6c84ee9de16875040762
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