summaryrefslogtreecommitdiffstats
path: root/src/kernel/xloop_file_fmt_raw.c
diff options
context:
space:
mode:
authorSimon Rettberg2024-12-11 16:34:41 +0100
committerSimon Rettberg2024-12-11 16:34:41 +0100
commit4995b9c979a3729b88ebe51575bd82242143ba5a (patch)
tree04921a6d01d43d1ec25f2f2eaf12341dab89d59f /src/kernel/xloop_file_fmt_raw.c
parentgithub: touch magic .prelink.mod files after cmake to fix latest CentOS (diff)
downloadxloop-4995b9c979a3729b88ebe51575bd82242143ba5a.tar.gz
xloop-4995b9c979a3729b88ebe51575bd82242143ba5a.tar.xz
xloop-4995b9c979a3729b88ebe51575bd82242143ba5a.zip
Fix compile on Linux 6.11+
Diffstat (limited to 'src/kernel/xloop_file_fmt_raw.c')
-rw-r--r--src/kernel/xloop_file_fmt_raw.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kernel/xloop_file_fmt_raw.c b/src/kernel/xloop_file_fmt_raw.c
index 6e68437..d8a4cb5 100644
--- a/src/kernel/xloop_file_fmt_raw.c
+++ b/src/kernel/xloop_file_fmt_raw.c
@@ -172,10 +172,17 @@ static int __raw_file_fmt_rw_aio(struct xloop_device *xlo, struct xloop_cmd *cmd
kthread_associate_blkcg(cmd->css);
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
+ if (rw == ITER_SOURCE)
+ ret = file->f_op->write_iter(&cmd->iocb, &iter);
+ else
+ ret = file->f_op->read_iter(&cmd->iocb, &iter);
+#else
if (rw == WRITE)
ret = call_write_iter(file, &cmd->iocb, &iter);
else
ret = call_read_iter(file, &cmd->iocb, &iter);
+#endif
__raw_file_fmt_rw_aio_do_completion(cmd);
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) && !RHEL_CHECK_VERSION(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))