Skip to content

Commit

Permalink
fs: 9p: add generic splice_write file operation
Browse files Browse the repository at this point in the history
The default splice operations got removed recently, add it back to 9p
with iter_file_splice_write like many other filesystems do.

Link: http://lkml.kernel.org/r/[email protected]
Fixes: 36e2c74 ("fs: don't allow splice read/write without explicit ops")
Signed-off-by: Dominique Martinet <[email protected]>
Acked-by: Toke Høiland-Jørgensen <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
  • Loading branch information
martinetd committed Dec 1, 2020
1 parent cf03f31 commit 960f4f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/9p/vfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,7 @@ const struct file_operations v9fs_cached_file_operations = {
.lock = v9fs_file_lock,
.mmap = v9fs_file_mmap,
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync,
};

Expand All @@ -669,6 +670,7 @@ const struct file_operations v9fs_cached_file_operations_dotl = {
.flock = v9fs_file_flock_dotl,
.mmap = v9fs_file_mmap,
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync_dotl,
};

Expand All @@ -681,6 +683,7 @@ const struct file_operations v9fs_file_operations = {
.lock = v9fs_file_lock,
.mmap = generic_file_readonly_mmap,
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync,
};

Expand All @@ -694,6 +697,7 @@ const struct file_operations v9fs_file_operations_dotl = {
.flock = v9fs_file_flock_dotl,
.mmap = generic_file_readonly_mmap,
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync_dotl,
};

Expand All @@ -706,6 +710,7 @@ const struct file_operations v9fs_mmap_file_operations = {
.lock = v9fs_file_lock,
.mmap = v9fs_mmap_file_mmap,
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync,
};

Expand All @@ -719,5 +724,6 @@ const struct file_operations v9fs_mmap_file_operations_dotl = {
.flock = v9fs_file_flock_dotl,
.mmap = v9fs_mmap_file_mmap,
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
.fsync = v9fs_file_fsync_dotl,
};

0 comments on commit 960f4f8

Please sign in to comment.