From 960f4f8a4e60da610af73c1264673f71f5a36efd Mon Sep 17 00:00:00 2001 From: Dominique Martinet Date: Tue, 1 Dec 2020 16:09:37 +0100 Subject: [PATCH] fs: 9p: add generic splice_write file operation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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/1606837496-21717-1-git-send-email-asmadeus@codewreck.org Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: Dominique Martinet Acked-by: Toke Høiland-Jørgensen Reviewed-by: Christoph Hellwig --- fs/9p/vfs_file.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 01026b47..be57689 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c @@ -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, }; @@ -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, }; @@ -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, }; @@ -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, }; @@ -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, }; @@ -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, }; -- 2.7.4