scst: Unbreak the RHEL 9.5 build

This commit is contained in:
Dhananjay Kamble
2024-11-05 15:10:38 -05:00
committed by Gleb Chesnokov
parent 2fea7e484f
commit 70cf2f6271
3 changed files with 12 additions and 4 deletions

View File

@@ -288,7 +288,9 @@ static inline void blkdev_put_backport(struct block_device *bdev, void *holder)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0) && \
(LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(6, 6, 0) >> 8 || \
LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 23))
LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 23)) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5))
/*
* See also commit e719b4d15674 ("block: Provide bdev_open_* functions") # v6.7, v6.6.23.
*/

View File

@@ -173,7 +173,9 @@ static int tape_attach(struct scst_device *dev)
((dev->scsi_dev->scsi_level <= SCSI_2) ?
((dev->scsi_dev->lun << 5) & 0xe0) : 0),
0 /* Mode Page 0 */,
#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, 5))
0 /* Sub Page */,
#endif
buffer, buffer_size,

View File

@@ -6083,7 +6083,9 @@ int scst_open_bdev_by_path(const char *path, blk_mode_t mode, void *holder,
const struct blk_holder_ops *hops,
struct scst_bdev_descriptor *bdev_desc)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5))
struct bdev_handle *bdev_handle;
bdev_handle = bdev_open_by_path(path, mode, holder, hops);
@@ -6109,7 +6111,9 @@ EXPORT_SYMBOL(scst_open_bdev_by_path);
void scst_release_bdev(struct scst_bdev_descriptor *bdev_desc)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5))
struct bdev_handle *bdev_handle = bdev_desc->priv;
if (bdev_handle)