From c20d0edef83e08f845a28fbe9a0eeea4ef011295 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Mon, 16 May 2022 11:23:20 +0300 Subject: [PATCH] scst_vdisk: Fix build on RHEL 8.6 Reported-by: Gilbert Standen Fixes: https://github.com/SCST-project/scst/issues/45 --- scst/src/dev_handlers/scst_vdisk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 8655c958a..c15e49c51 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -466,7 +466,9 @@ static int vdisk_blockio_flush(struct block_device *bdev, gfp_t gfp_mask, (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8 || \ RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 4) res = blkdev_issue_flush(bdev, gfp_mask, NULL); -#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0) +#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8 || \ + RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 6) res = blkdev_issue_flush(bdev, gfp_mask); #else res = blkdev_issue_flush(bdev);