Linux 6.5 compat: replace generic_file_splice_read with filemap_splice_read
commit5a22de144abf2829bc8112e17a7a7e542da53dc5
authorColeman Kane <ckane@colemankane.org>
Mon, 7 Aug 2023 22:47:46 +0000 (7 18:47 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 19 Sep 2023 15:50:01 +0000 (19 08:50 -0700)
tree84ab6874618c9c853c9eab588009e9c994f96105
parent31a4673c05ea942498a278d9dd519f251b501db1
Linux 6.5 compat: replace generic_file_splice_read with filemap_splice_read

The generic_file_splice_read function was removed in Linux 6.5 in favor
of filemap_splice_read. Add an autoconf test for filemap_splice_read and
use it if it is found as the handler for .splice_read in the
file_operations struct. Additionally, ITER_PIPE was removed in 6.5. This
change removes the ITER_* macros that OpenZFS doesn't use from being
tested in config/kernel-vfs-iov_iter.m4. The removal of ITER_PIPE was
causing the test to fail, which also affected the code responsible for
setting the .splice_read handler, above. That behavior caused run-time
panics on Linux 6.5.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Coleman Kane <ckane@colemankane.org>
Closes #15155
config/kernel-filemap-splice-read.m4 [new file with mode: 0644]
config/kernel-vfs-iov_iter.m4
config/kernel.m4
module/os/linux/zfs/zpl_file.c