From: Nick Piggin As per the comment here, we can only use that shortcut if rcu_read_lock disabled preemption. It would be somewhat annoying to have to put preempt_disable/preempt_enable around all callers in order to support this, but preempt RCU isn't going to be hugely performance critical anyway (and actually it actively trades performance for fewer preempt off sections), so it can use the slightly slower path quite happily. Cc: Jeff Garzik Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Hugh Dickins Cc: "Paul E. McKenney" Cc: Peter Zijlstra Signed-off-by: Andrew Morton --- include/linux/pagemap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN include/linux/pagemap.h~mm-speculative-page-references-fix include/linux/pagemap.h --- a/include/linux/pagemap.h~mm-speculative-page-references-fix +++ a/include/linux/pagemap.h @@ -111,7 +111,7 @@ static inline int page_cache_get_specula { VM_BUG_ON(in_interrupt()); -#ifndef CONFIG_SMP +#if !defined(CONFIG_SMP) && defined(CONFIG_CLASSIC_RCU) # ifdef CONFIG_PREEMPT VM_BUG_ON(!in_atomic()); # endif _