From 013aecf10e48605cb248a1ad54c125ee032b9af9 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 10 Jan 2021 01:15:01 +0000 Subject: [PATCH] scst: Fix the PERCPU_REF_ALLOW_REINIT backport Fixes: 8eeb9af89117 ("scst: Fix the CentOS / RHEL 8.[012] builds") git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9329 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index b344f4380..634e8a9ae 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1228,16 +1228,15 @@ static inline int pcie_capability_read_dword(struct pci_dev *dev, int pos, #include #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0) -#if defined(RHEL_RELEASE_CODE) && \ - RHEL_RELEASE_CODE -0 >= RHEL_RELEASE_VERSION(8, 3)) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(8, 3)) /* * See also commit 09ed79d6d75f ("percpu_ref: introduce PERCPU_REF_ALLOW_REINIT * flag") # v5.3. */ #define PERCPU_REF_ALLOW_REINIT 0 #endif -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) #define PERCPU_COUNT_BIAS (1U << 31)