Skip to content

Commit

Permalink
scst: Unbreak the RHEL 9.4 build
Browse files Browse the repository at this point in the history
Fixes: #201
  • Loading branch information
lnocturno committed Dec 27, 2023
1 parent fd88df1 commit 2d243a7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
4 changes: 3 additions & 1 deletion iscsi-scst/kernel/isert-scst/isert_login.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 3 additions & 1 deletion scst/include/backport.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 3 additions & 1 deletion scst/src/dev_handlers/scst_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion scst/src/scst_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 6 additions & 2 deletions scst/src/scst_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 2d243a7

Please sign in to comment.