]> git.ipfire.org Git - thirdparty/linux.git/commit
fs: use splice_copy_file_range() inline helper
authorAmir Goldstein <amir73il@gmail.com>
Tue, 12 Dec 2023 09:44:37 +0000 (11:44 +0200)
committerChristian Brauner <brauner@kernel.org>
Tue, 12 Dec 2023 15:20:02 +0000 (16:20 +0100)
commit705bcfcbde38b9dd4db00cd3deb0b98bddb0dd4a
tree77e4d1a15c6bc790be3f6d5b215a707d9b21d61b
parent0f292086c22b43202daffc14b585d3b54b9a1206
fs: use splice_copy_file_range() inline helper

generic_copy_file_range() is just a wrapper around splice_file_range(),
which caps the maximum copy length.

The only caller of splice_file_range(), namely __ceph_copy_file_range()
is already ready to cope with short copy.

Move the length capping into splice_file_range() and replace the exported
symbol generic_copy_file_range() with a simple inline helper.

Suggested-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/linux-fsdevel/20231204083849.GC32438@lst.de/
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20231212094440.250945-3-amir73il@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/ceph/file.c
fs/fuse/file.c
fs/nfs/nfs4file.c
fs/read_write.c
fs/smb/client/cifsfs.c
fs/splice.c
include/linux/fs.h
include/linux/splice.h