Skip to contentSkip to conversation

vm: Adjust ifdef for TINY_RCU

RFC PATCH New Paul E. McKenney 1 participant 1 message Mar 4, 2013 Page cache

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 vm: Adjust ifdef for TINY_RCU

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.

include/linux/pagemap.h +1 -1
index 0e38e13..e3dea75 100644
@@ -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