Skip to content

Commit 4995b9c

Browse files
committed
Fix compile on Linux 6.11+
1 parent da025e7 commit 4995b9c

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/kernel/xloop_file_fmt_raw.c

+7
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,17 @@ static int __raw_file_fmt_rw_aio(struct xloop_device *xlo, struct xloop_cmd *cmd
172172
kthread_associate_blkcg(cmd->css);
173173
#endif
174174

175+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 11, 0)
176+
if (rw == ITER_SOURCE)
177+
ret = file->f_op->write_iter(&cmd->iocb, &iter);
178+
else
179+
ret = file->f_op->read_iter(&cmd->iocb, &iter);
180+
#else
175181
if (rw == WRITE)
176182
ret = call_write_iter(file, &cmd->iocb, &iter);
177183
else
178184
ret = call_read_iter(file, &cmd->iocb, &iter);
185+
#endif
179186

180187
__raw_file_fmt_rw_aio_do_completion(cmd);
181188
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) && !RHEL_CHECK_VERSION(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 0))

src/kernel/xloop_main.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include "xloop_main_4.18.c"
1313
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0)
1414
#include "xloop_main_5.15.c"
15-
#else
15+
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
1616
#include "xloop_main_6.6.c"
17+
#else
18+
#include "xloop_main_6.11.c"
1719
#endif

src/kernel/xloop_main.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#include "xloop_main_4.18.h"
1818
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0)
1919
#include "xloop_main_5.15.h"
20-
#else
20+
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
2121
#include "xloop_main_6.6.h"
22+
#else
23+
#include "xloop_main_6.11.h"
2224
#endif

0 commit comments

Comments
 (0)