]> git.ipfire.org Git - thirdparty/linux.git/commit
splice: remove permission hook from iter_file_splice_write()
authorAmir Goldstein <amir73il@gmail.com>
Thu, 23 Nov 2023 17:51:44 +0000 (18:51 +0100)
committerChristian Brauner <brauner@kernel.org>
Fri, 24 Nov 2023 08:22:28 +0000 (09:22 +0100)
commitd53471ba6f7ae97a4e223539029528108b705af1
tree60635c7a772a2c32e5cbb1d4a0fe1e22821e50bc
parentb70d8e2b8ce56c79d9d18d20955e6de1631e9509
splice: remove permission hook from iter_file_splice_write()

All the callers of ->splice_write(), (e.g. do_splice_direct() and
do_splice()) already check rw_verify_area() for the entire range
and perform all the other checks that are in vfs_write_iter().

Instead of creating another tiny helper for special caller, just
open-code it.

This is needed for fanotify "pre content" events.

Suggested-by: Jan Kara <jack@suse.cz>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20231122122715.2561213-6-amir73il@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/splice.c