afs: Fix copy_file_range()
authorDavid Howells <dhowells@redhat.com>
Tue, 27 Oct 2020 09:39:04 +0000 (09:39 +0000)
committerDavid Howells <dhowells@redhat.com>
Tue, 27 Oct 2020 22:05:56 +0000 (22:05 +0000)
commit06a17bbe1d47fec6232505c355b367797f6a635c
treeed4d1116d151955bd47556db38f86cb7bb751075
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec
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>
fs/afs/file.c