This is a note to let you know that I've just added the patch titled backing-file: convert to using fops->splice_write to the 6.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: backing-file-convert-to-using-fops-splice_write.patch and it can be found in the queue-6.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 511cf885ff52fe6eee75c1825222f042335fce06 Author: Ed Tsai <ed.tsai@xxxxxxxxxxxx> Date: Mon Jul 8 15:22:06 2024 +0800 backing-file: convert to using fops->splice_write [ Upstream commit 996b37da1e0f51314d4186b326742c2a95a9f0dd ] Filesystems may define their own splice write. Therefore, use the file fops instead of invoking iter_file_splice_write() directly. Signed-off-by: Ed Tsai <ed.tsai@xxxxxxxxxxxx> Link: https://lore.kernel.org/r/20240708072208.25244-1-ed.tsai@xxxxxxxxxxxx Fixes: 5ca73468612d ("fuse: implement splice read/write passthrough") Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx> Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/backing-file.c b/fs/backing-file.c index afb557446c27c..8860dac58c37e 100644 --- a/fs/backing-file.c +++ b/fs/backing-file.c @@ -303,13 +303,16 @@ ssize_t backing_file_splice_write(struct pipe_inode_info *pipe, if (WARN_ON_ONCE(!(out->f_mode & FMODE_BACKING))) return -EIO; + if (!out->f_op->splice_write) + return -EINVAL; + ret = file_remove_privs(ctx->user_file); if (ret) return ret; old_cred = override_creds(ctx->cred); file_start_write(out); - ret = iter_file_splice_write(pipe, out, ppos, len, flags); + ret = out->f_op->splice_write(pipe, out, ppos, len, flags); file_end_write(out); revert_creds(old_cred);