scst: Fix the PERCPU_REF_ALLOW_REINIT backport (trunk r9329)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.5.x@9453 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2021-06-24 03:48:14 +00:00
parent e0c19875ea
commit 4189c63637
+3 -4
View File
@@ -1171,16 +1171,15 @@ static inline int pcie_capability_read_dword(struct pci_dev *dev, int pos,
#include <linux/percpu-refcount.h>
#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)