lkml.org 
[lkml]   [2020]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] fs: 9p: add generic splice_write file operation
Date
The default splice operations got removed recently, add it back to 9p
with iter_file_splice_write like many other filesystems do.

Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops")
Cc: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
---
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 145f6f83aa9a..5f9c0c796a37 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -668,6 +668,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,
};

@@ -681,6 +682,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,
};

@@ -693,6 +695,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,
};

@@ -706,6 +709,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,
};

@@ -718,6 +722,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,
};

@@ -731,5 +736,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.28.0
\
 
 \ /
  Last update: 2020-12-01 16:47    [W:0.074 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site