Skip to content

Commit 4c831f3

Browse files
bbkzzdubeyko
authored andcommitted
hfs: make splice write available again
Since 5.10, splice() or sendfile() return EINVAL. This was caused by commit 36e2c74 ("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: 36e2c74 ("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-2-frank.li@vivo.com Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
1 parent 2eafb66 commit 4c831f3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/hfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ static const struct file_operations hfs_file_operations = {
692692
.write_iter = generic_file_write_iter,
693693
.mmap = generic_file_mmap,
694694
.splice_read = filemap_splice_read,
695+
.splice_write = iter_file_splice_write,
695696
.fsync = hfs_file_fsync,
696697
.open = hfs_file_open,
697698
.release = hfs_file_release,

0 commit comments

Comments
 (0)