From 71c3c1527bb50284db6e447cfd79ef65f0146c1c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Fri, 15 Mar 2024 14:33:01 +0100 Subject: [KERNEL] Fix build on Alma/RHEL/Rocky 9.2 --- src/kernel/xloop_file_fmt_raw.c | 4 ++-- src/kernel/xloop_main_rhel_9.0.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kernel/xloop_file_fmt_raw.c b/src/kernel/xloop_file_fmt_raw.c index 5f8d453..6e68437 100644 --- a/src/kernel/xloop_file_fmt_raw.c +++ b/src/kernel/xloop_file_fmt_raw.c @@ -83,7 +83,7 @@ static void __raw_file_fmt_rw_aio_do_completion(struct xloop_cmd *cmd) #endif } -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) && !RHEL_CHECK_VERSION(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 2)) 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) @@ -182,7 +182,7 @@ 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 LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) && !RHEL_CHECK_VERSION(RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 2)) if (ret != -EIOCBQUEUED) cmd->iocb.ki_complete(&cmd->iocb, ret, 0); #else diff --git a/src/kernel/xloop_main_rhel_9.0.c b/src/kernel/xloop_main_rhel_9.0.c index abb256d..66f6884 100644 --- a/src/kernel/xloop_main_rhel_9.0.c +++ b/src/kernel/xloop_main_rhel_9.0.c @@ -2154,7 +2154,7 @@ static int xloop_add(int i) out_free_file_fmt: xloop_file_fmt_free(xlo->xlo_fmt); out_cleanup_disk: -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) +#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 2) put_disk(xlo->xlo_disk); #else blk_cleanup_disk(xlo->xlo_disk); @@ -2177,7 +2177,7 @@ static void xloop_remove(struct xloop_device *xlo) debugfs_remove(xlo->xlo_dbgfs_dir); /* Make this xloop device unreachable from pathname. */ del_gendisk(xlo->xlo_disk); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0) +#if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 2) put_disk(xlo->xlo_disk); #else blk_cleanup_disk(xlo->xlo_disk); -- cgit v1.2.3-55-g7522