aboutsummaryrefslogtreecommitdiffstats
path: root/module/os
diff options
context:
space:
mode:
authorColeman Kane <[email protected]>2023-08-08 18:42:32 -0400
committerBrian Behlendorf <[email protected]>2023-09-19 08:50:01 -0700
commit58a707375fef23697cb029fbad0e7e92bc78025b (patch)
treeef57093c00f8e5eb6edce33f1298f9e5abb56ef3 /module/os
parent5a22de144abf2829bc8112e17a7a7e542da53dc5 (diff)
Linux 6.5 compat: Use copy_splice_read instead of filemap_splice_read
Using the filemap_splice_read function for the splice_read handler was leading to occasional data corruption under certain circumstances. Favor using copy_splice_read instead, which does not demonstrate the same erroneous behavior under the tested failure cases. Reviewed-by: Brian Atkinson <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes #15164
Diffstat (limited to 'module/os')
-rw-r--r--module/os/linux/zfs/zpl_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c
index 24cc1064a..3caa0fc6c 100644
--- a/module/os/linux/zfs/zpl_file.c
+++ b/module/os/linux/zfs/zpl_file.c
@@ -1323,8 +1323,8 @@ const struct file_operations zpl_file_operations = {
.read_iter = zpl_iter_read,
.write_iter = zpl_iter_write,
#ifdef HAVE_VFS_IOV_ITER
-#ifdef HAVE_FILEMAP_SPLICE_READ
- .splice_read = filemap_splice_read,
+#ifdef HAVE_COPY_SPLICE_READ
+ .splice_read = copy_splice_read,
#else
.splice_read = generic_file_splice_read,
#endif