Fix compile on Rockylinux 9
Signed-off-by: MohammadJavad Asadi <mj.asadi72@gmail.com>
This commit is contained in:
parent
ba5bdf4796
commit
b4a1e9aac3
@ -31,18 +31,25 @@ static inline void bd_release_from_disk(struct block_device *bdev,
|
|||||||
return bd_unlink_disk_holder(bdev, disk);
|
return bd_unlink_disk_holder(bdev, disk);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
#ifdef RHEL_MAJOR
|
||||||
|
#if RHEL_MAJOR >= 9
|
||||||
#define KRETURN(x) return
|
#define KRETURN(x) return
|
||||||
#define MAKE_RQ_RET_TYPE void
|
#define MAKE_RQ_RET_TYPE void
|
||||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
|
#endif
|
||||||
|
#else
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
|
||||||
|
#define KRETURN(x) return
|
||||||
|
#define MAKE_RQ_RET_TYPE void
|
||||||
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
|
||||||
#define KRETURN(x) ({ return (x); })
|
#define KRETURN(x) ({ return (x); })
|
||||||
#define MAKE_RQ_RET_TYPE blk_qc_t
|
#define MAKE_RQ_RET_TYPE blk_qc_t
|
||||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
|
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
|
||||||
#define KRETURN(x) return
|
#define KRETURN(x) return
|
||||||
#define MAKE_RQ_RET_TYPE void
|
#define MAKE_RQ_RET_TYPE void
|
||||||
#else
|
#else
|
||||||
#define KRETURN(x) ({ return (x); })
|
#define KRETURN(x) ({ return (x); })
|
||||||
#define MAKE_RQ_RET_TYPE int
|
#define MAKE_RQ_RET_TYPE int
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int __init cas_init_exp_objs(void)
|
int __init cas_init_exp_objs(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user