From b9969a09a5a77f2c963a1aaba194815179fdf041 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 11 Mar 2019 02:51:09 +0000 Subject: [PATCH] scst: Simplify the percpu-ref code for RHEL 7 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8045 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 2d10fce11..b222ab2b2 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -30,9 +30,6 @@ #endif #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) -#include -#endif #include /* struct scatterlist */ #include /* kmalloc() */ #include /* sizeof_field() */ @@ -875,7 +872,9 @@ static inline struct ib_pd *ib_alloc_pd_backport(struct ib_device *device) #endif /* */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) && RHEL_MAJOR -0 <= 6 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) || RHEL_MAJOR -0 >= 7 +#include +#else struct percpu_ref; typedef void (percpu_ref_func_t)(struct percpu_ref *);