From: Paul E. McKenney Date: Tue, 26 Mar 2013 23:24:17 +0000 (+1100) Subject: vm: adjust ifdef for TINY_RCU X-Git-Tag: next-20130404~3^2~461 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=92c0330997db61e6d3dbefbeb6671e61e484237f;p=karo-tx-linux.git 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. Signed-off-by: Paul E. McKenney Reported-by: Andi Kleen Signed-off-by: Andrew Morton --- diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 0e38e13eb249..e3dea75a078b 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -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