summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2025-05-29 08:00:31 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-15 12:13:32 +0200
commit248d605319fe88248fc17db582a1c0c3b38eda6f (patch)
tree64366559234039d1c54a6d84cffcf195c2de38ea
parent0e5c17c2376bc0af719d002631a1d321b9e6def3 (diff)
hfsplus: make splice write available again
[ Upstream commit 2eafb669da0bf71fac0838bff13594970674e2b4 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--fs/hfsplus/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index f331e9574217..c85b5802ec0f 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -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,