aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/rcutree_plugin.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 3a0ae0355222..4d2c068ba13e 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -284,7 +284,7 @@ static struct list_head *rcu_next_node_entry(struct task_struct *t,
284 * notify RCU core processing or task having blocked during the RCU 284 * notify RCU core processing or task having blocked during the RCU
285 * read-side critical section. 285 * read-side critical section.
286 */ 286 */
287static void rcu_read_unlock_special(struct task_struct *t) 287static noinline void rcu_read_unlock_special(struct task_struct *t)
288{ 288{
289 int empty; 289 int empty;
290 int empty_exp; 290 int empty_exp;
@@ -391,11 +391,11 @@ void __rcu_read_unlock(void)
391 struct task_struct *t = current; 391 struct task_struct *t = current;
392 392
393 barrier(); /* needed if we ever invoke rcu_read_unlock in rcutree.c */ 393 barrier(); /* needed if we ever invoke rcu_read_unlock in rcutree.c */
394 --t->rcu_read_lock_nesting; 394 if (--t->rcu_read_lock_nesting == 0) {
395 barrier(); /* decrement before load of ->rcu_read_unlock_special */ 395 barrier(); /* decr before ->rcu_read_unlock_special load */
396 if (t->rcu_read_lock_nesting == 0 && 396 if (unlikely(ACCESS_ONCE(t->rcu_read_unlock_special)))
397 unlikely(ACCESS_ONCE(t->rcu_read_unlock_special))) 397 rcu_read_unlock_special(t);
398 rcu_read_unlock_special(t); 398 }
399#ifdef CONFIG_PROVE_LOCKING 399#ifdef CONFIG_PROVE_LOCKING
400 WARN_ON_ONCE(ACCESS_ONCE(t->rcu_read_lock_nesting) < 0); 400 WARN_ON_ONCE(ACCESS_ONCE(t->rcu_read_lock_nesting) < 0);
401#endif /* #ifdef CONFIG_PROVE_LOCKING */ 401#endif /* #ifdef CONFIG_PROVE_LOCKING */