]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
vm: adjust ifdef for TINY_RCU
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 26 Mar 2013 23:24:17 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:12:02 +0000 (17:12 +1100)
There is an ifdef in page_cache_get_speculative() that checks for !SMP and
TREE_RCU, which has been an impossible combination since the advent of
TINY_RCU.  The ifdef enables a fastpath that is valid when preemption is
disabled by rcu_read_lock() in UP systems, which is the case when TINY_RCU
is enabled.  This commit therefore adjusts the ifdef to generate the
fastpath when TINY_RCU is enabled.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/pagemap.h

index 0e38e13eb2498360b12a0662e994a0d7f9a7af31..e3dea75a078ba67b12408abd743633e3ea0a3995 100644 (file)
@@ -149,7 +149,7 @@ static inline int page_cache_get_speculative(struct page *page)
 {
        VM_BUG_ON(in_interrupt());
 
-#if !defined(CONFIG_SMP) && defined(CONFIG_TREE_RCU)
+#ifdef CONFIG_TINY_RCU
 # ifdef CONFIG_PREEMPT_COUNT
        VM_BUG_ON(!in_atomic());
 # endif