Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile on Rockylinux 9 #1470

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions modules/cas_cache/exp_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,25 @@ static inline void bd_release_from_disk(struct block_device *bdev,
return bd_unlink_disk_holder(bdev, disk);
}

#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 MAKE_RQ_RET_TYPE blk_qc_t
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
#define KRETURN(x) return
#define MAKE_RQ_RET_TYPE void
#ifdef RHEL_MAJOR
#if RHEL_MAJOR >= 9
#define KRETURN(x) return
#define MAKE_RQ_RET_TYPE void
#endif
#else
#define KRETURN(x) ({ return (x); })
#define MAKE_RQ_RET_TYPE int
#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 MAKE_RQ_RET_TYPE blk_qc_t
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
#define KRETURN(x) return
#define MAKE_RQ_RET_TYPE void
#else
#define KRETURN(x) ({ return (x); })
#define MAKE_RQ_RET_TYPE int
#endif
#endif

int __init cas_init_exp_objs(void)
Expand Down
Loading