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 <[email protected]> Reviewed-by: Viacheslav Dubeyko <[email protected]> Signed-off-by: Viacheslav Dubeyko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Viacheslav Dubeyko <[email protected]>
1 parent 2eafb66 commit 4c831f3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)