Skip to content

Commit 237ee28

Browse files
Joachim Henkegregkh
authored andcommitted
nilfs2: make splice write available again
commit a35d8f0 upstream. Since 5.10, splice() or sendfile() to NILFS2 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. Link: https://lkml.kernel.org/r/1612784101-14353-1-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Joachim Henke <joachim.henke@t-systems.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Tested-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Cc: <stable@vger.kernel.org> [5.10+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4e78c33 commit 237ee28

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/nilfs2/file.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ const struct file_operations nilfs_file_operations = {
141141
/* .release = nilfs_release_file, */
142142
.fsync = nilfs_sync_file,
143143
.splice_read = generic_file_splice_read,
144+
.splice_write = iter_file_splice_write,
144145
};
145146

146147
const struct inode_operations nilfs_file_inode_operations = {

0 commit comments

Comments
 (0)