From d2976ad7ce5f5a6f4f51ed8be11254b24f24fac8 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 18 Dec 2013 05:56:14 +0000 Subject: [PATCH] scst: set_cpus_allowed_ptr() workaround for RHEL 5.10 Apparently RHEL 5.9 has an implementation of set_cpus_allowed_ptr() but RHEL 5.10 not. Work around this by providing an implementation. Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5147 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index 1d7ca69b1..bb566b720 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -160,12 +160,9 @@ static inline void cpumask_copy(cpumask_t *dstp, } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) && !defined(RHEL_MAJOR) -static inline int set_cpus_allowed_ptr(struct task_struct *p, - const cpumask_t *new_mask) -{ - return set_cpus_allowed(p, *new_mask); -} +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 6) +#define set_cpus_allowed_ptr(p, new_mask) set_cpus_allowed((p), *(new_mask)) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 31)