summaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2020-10-27 10:39:04 +0100
committerDavid Howells <dhowells@redhat.com>2020-10-27 23:05:56 +0100
commit06a17bbe1d47fec6232505c355b367797f6a635c (patch)
treeed4d1116d151955bd47556db38f86cb7bb751075 /fs/afs
parentLinux 5.10-rc1 (diff)
downloadlinux-06a17bbe1d47fec6232505c355b367797f6a635c.tar.xz
linux-06a17bbe1d47fec6232505c355b367797f6a635c.zip
afs: Fix copy_file_range()
The prevention of splice-write without explicit ops made the copy_file_write() syscall to an afs file (as done by the generic/112 xfstest) fail with EINVAL. Fix by using iter_file_splice_write() for afs. Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: David Howells <dhowells@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c
index 371d1488cc54..91225421ad37 100644
--- a/fs/afs/file.c
+++ b/fs/afs/file.c
@@ -33,6 +33,7 @@ const struct file_operations afs_file_operations = {
.write_iter = afs_file_write,
.mmap = afs_file_mmap,
.splice_read = generic_file_splice_read,
+ .splice_write = iter_file_splice_write,
.fsync = afs_fsync,
.lock = afs_lock,
.flock = afs_flock,