diff --git a/scst/include/backport.h b/scst/include/backport.h index b046c3720..e3364173f 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -2234,6 +2234,9 @@ static inline void scsi_build_sense(struct scsi_cmnd *scmd, int desc, #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) + +#if (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 != RHEL_RELEASE_VERSION(8, 7)) /* * See also 51f3a4788928 ("scsi: core: Introduce the scsi_cmd_to_rq() * function"). @@ -2242,6 +2245,7 @@ static inline struct request *scsi_cmd_to_rq(struct scsi_cmnd *scmd) { return scmd->request; } +#endif /* * See also commit c611529e7cd3 ("sd: Honor block layer integrity handling @@ -2261,7 +2265,9 @@ static inline unsigned int scsi_prot_interval(struct scsi_cmnd *scmd) * helper") and ddd0bc756983 ("block: move ref_tag calculation func to the * block layer"; v4.19). */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || defined(RHEL_MAJOR) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0) || \ + (defined(RHEL_RELEASE_CODE) && \ + RHEL_RELEASE_CODE -0 != RHEL_RELEASE_VERSION(8, 7))) static inline u32 scsi_prot_ref_tag(struct scsi_cmnd *scmd) { #if defined(RHEL_MAJOR) && RHEL_MAJOR -0 == 7