diff options
Diffstat (limited to 'src/kernel/xloop_file_fmt_raw.c')
-rw-r--r-- | src/kernel/xloop_file_fmt_raw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/kernel/xloop_file_fmt_raw.c b/src/kernel/xloop_file_fmt_raw.c index 8a53c11..52d879a 100644 --- a/src/kernel/xloop_file_fmt_raw.c +++ b/src/kernel/xloop_file_fmt_raw.c @@ -148,7 +148,11 @@ static void __raw_file_fmt_rw_aio_do_completion(struct xloop_cmd *cmd) #endif } +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) static void __raw_file_fmt_rw_aio_complete(struct kiocb *iocb, long ret, long ret2) +#else +static void __raw_file_fmt_rw_aio_complete(struct kiocb *iocb, long ret) +#endif { struct xloop_cmd *cmd = container_of(iocb, struct xloop_cmd, iocb); @@ -241,8 +245,13 @@ static int __raw_file_fmt_rw_aio(struct xloop_device *xlo, struct xloop_cmd *cmd kthread_associate_blkcg(NULL); #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) if (ret != -EIOCBQUEUED) cmd->iocb.ki_complete(&cmd->iocb, ret, 0); +#else + if (ret != -EIOCBQUEUED) + cmd->iocb.ki_complete(&cmd->iocb, ret); +#endif return 0; } |