On Tue, Nov 21, 2023 at 4:56 PM Christian Brauner <brauner@xxxxxxxxxx> wrote: > > On Tue, Nov 14, 2023 at 05:33:11PM +0200, Amir Goldstein wrote: > > 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(). > > > > Create a helper do_iter_writev(), that performs the write without the > > checks and use it in iter_file_splice_write() to avoid the redundant > > rw_verify_area() checks. > > > > This is needed for fanotify "pre content" events. > > > > Suggested-by: Jan Kara <jack@xxxxxxx> > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> > > --- > > If you resend anyway, for the low-level splice helpers specifically it > would be nice to add a comment that mentions that the caller is expected > to perform basic rw checks. Will do. Thanks, Amir.