]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hfsplus: make splice write available again
authorYangtao Li <frank.li@vivo.com>
Thu, 29 May 2025 14:00:31 +0000 (08:00 -0600)
committerViacheslav Dubeyko <slava@dubeyko.com>
Mon, 7 Jul 2025 00:53:37 +0000 (17:53 -0700)
Since 5.10, splice() or sendfile() return EINVAL. This was
caused by commit 36e2c7421f02 ("fs: don't allow splice read/write
without explicit ops").

This patch initializes the splice_write field in file_operations, like
most file systems do, to restore the functionality.

Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops")
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Viacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Link: https://lore.kernel.org/r/20250529140033.2296791-1-frank.li@vivo.com
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
fs/hfsplus/inode.c

index f331e957421783819edaae4796d0b9babe9ede22..c85b5802ec0f959645b4774fe9f964bdbb3d31ed 100644 (file)
@@ -368,6 +368,7 @@ static const struct file_operations hfsplus_file_operations = {
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .splice_read    = filemap_splice_read,
+       .splice_write   = iter_file_splice_write,
        .fsync          = hfsplus_file_fsync,
        .open           = hfsplus_file_open,
        .release        = hfsplus_file_release,