scst: Unbreak the RHEL 9.4 build

Fixes: https://github.com/SCST-project/scst/issues/201
This commit is contained in:
Gleb Chesnokov
2023-12-27 18:13:34 +03:00
parent fd88df1e25
commit 2d243a71e7
5 changed files with 18 additions and 6 deletions

View File

@@ -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");

View File

@@ -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.

View File

@@ -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);

View File

@@ -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);

View File

@@ -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)