Commit: 2d243a7
GitHub URL: https://github.com/SCST-project/scst/commit/2d243a71e7558ff036e7225481569d9da2898adc
Author: Gleb Chesnokov
Date: 2023-12-27T18:27:42+03:00
Log Message:
-----------
scst: Unbreak the RHEL 9.4 build
Fixes: https://github.com/SCST-project/scst/issues/201
Modified Paths:
--------------
iscsi-scst/kernel/isert-scst/isert_login.c | 4 +++-
scst/include/backport.h | 4 +++-
scst/src/dev_handlers/scst_user.c | 4 +++-
scst/src/scst_event.c | 4 +++-
scst/src/scst_main.c | 8 ++++++--
5 files changed, 18 insertions(+), 6 deletions(-)
===================================================================
diff --git a/iscsi-scst/kernel/isert-scst/isert_login.c b/iscsi-scst/kernel/isert-scst/isert_login.c
index cd6d238..1ae05f9 100644
--- a/iscsi-scst/kernel/isert-scst/isert_login.c
+++ b/iscsi-scst/kernel/isert-scst/isert_login.c
@@ -1000,7 +1000,9 @@ int __init isert_init_login_devs(unsigned int ndevs)
goto fail; /* Make this more graceful */
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) && \
+ (!defined(RHEL_RELEASE_CODE) || \
+ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4))
isert_class = class_create(THIS_MODULE, "isert_scst");
#else
isert_class = class_create("isert_scst");
diff --git a/scst/include/backport.h b/scst/include/backport.h
index 56d25e4..7386fa3 100644
--- a/scst/include/backport.h
+++ b/scst/include/backport.h
@@ -231,7 +231,9 @@ void blk_execute_rq_nowait_backport(struct request *rq, bool at_head)
/* <linux/blkdev.h> */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 5, 0) && \
+ (!defined(RHEL_RELEASE_CODE) || \
+ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4))
/*
* See also commit 05bdb9965305 ("block: replace fmode_t with a block-specific
* type for block open flags") # v6.5.
diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c
index 6f579b8..d982d5e 100644
--- a/scst/src/dev_handlers/scst_user.c
+++ b/scst/src/dev_handlers/scst_user.c
@@ -4145,7 +4145,9 @@ static int __init init_scst_user(void)
if (res < 0)
goto out_cache;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) && \
+ (!defined(RHEL_RELEASE_CODE) || \
+ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4))
dev_user_sysfs_class = class_create(THIS_MODULE, DEV_USER_NAME);
#else
dev_user_sysfs_class = class_create(DEV_USER_NAME);
diff --git a/scst/src/scst_event.c b/scst/src/scst_event.c
index b744e17..71647bd 100644
--- a/scst/src/scst_event.c
+++ b/scst/src/scst_event.c
@@ -1118,7 +1118,9 @@ int scst_event_init(void)
goto out;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) && \
+ (!defined(RHEL_RELEASE_CODE) || \
+ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4))
scst_event_sysfs_class = class_create(THIS_MODULE, SCST_EVENT_NAME);
#else
scst_event_sysfs_class = class_create(SCST_EVENT_NAME);
diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c
index 5ca545f..3dd3396 100644
--- a/scst/src/scst_main.c
+++ b/scst/src/scst_main.c
@@ -2157,7 +2157,9 @@ unsigned int scst_get_setup_id(void)
}
EXPORT_SYMBOL_GPL(scst_get_setup_id);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) && \
+ (!defined(RHEL_RELEASE_CODE) || \
+ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4))
static int scst_add(struct device *cdev, struct class_interface *intf)
#else
static int scst_add(struct device *cdev)
@@ -2178,7 +2180,9 @@ static int scst_add(struct device *cdev)
return res;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) && \
+ (!defined(RHEL_RELEASE_CODE) || \
+ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 4))
static void scst_remove(struct device *cdev, struct class_interface *intf)
#else
static void scst_remove(struct device *cdev)
|