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 <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #15164
This commit is contained in:
Coleman Kane
2023-08-08 18:42:32 -04:00
committed by GitHub
parent 8150090257
commit 8ce2eba9e6
3 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -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