From 8ed3a0946e1fbd21d7f68997e3589e2ede6a47ee Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Thu, 22 May 2014 10:54:33 +1000 Subject: [PATCH] rwsem-support-optimistic-spinning-fix Signed-off-by: Andrew Morton --- include/linux/rwsem.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 3e108f154cb6..091d9935c247 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h @@ -64,7 +64,7 @@ static inline int rwsem_is_locked(struct rw_semaphore *sem) # define __RWSEM_DEP_MAP_INIT(lockname) #endif -#ifdef CONFIG_SMP +#if defined(CONFIG_SMP) && defined(CONFIG_RWSEM_XCHGADD_ALGORITHM) #define __RWSEM_INITIALIZER(name) \ { RWSEM_UNLOCKED_VALUE, \ __RAW_SPIN_LOCK_UNLOCKED(name.wait_lock), \ -- 2.39.2