diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-05-02 08:18:40 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-05-02 08:18:40 -0700 |
commit | 8ef0f37efb7863a04b1e4102d42b7c0b1a59d40f (patch) | |
tree | 1ec092824b9fe6377174df097e61bd1603660646 /kernel/rcu/tree_plugin.h | |
parent | 98059b98619d093366462ff0a4e1258e946accb9 (diff) | |
download | linux-8ef0f37efb7863a04b1e4102d42b7c0b1a59d40f.tar.gz linux-8ef0f37efb7863a04b1e4102d42b7c0b1a59d40f.tar.bz2 linux-8ef0f37efb7863a04b1e4102d42b7c0b1a59d40f.zip |
rcu: Open-code the rcu_cblist_empty() function
Because the rcu_cblist_empty() just samples the ->head pointer, and
because the rcu_cblist structure is quite straightforward, it makes
sense to open-code rcu_cblist_empty(p) as !p->head, cutting out a
level of indirection. This commit makes this change.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/rcu/tree_plugin.h')
-rw-r--r-- | kernel/rcu/tree_plugin.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 7f1d677a2a25..6b4b1f8a272d 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -1942,12 +1942,12 @@ static bool __maybe_unused rcu_nocb_adopt_orphan_cbs(struct rcu_state *rsp, return false; /* First, enqueue the donelist, if any. This preserves CB ordering. */ - if (!rcu_cblist_empty(&rsp->orphan_done)) { + if (rsp->orphan_done.head) { __call_rcu_nocb_enqueue(rdp, rcu_cblist_head(&rsp->orphan_done), rcu_cblist_tail(&rsp->orphan_done), ql, qll, flags); } - if (!rcu_cblist_empty(&rsp->orphan_pend)) { + if (rsp->orphan_pend.head) { __call_rcu_nocb_enqueue(rdp, rcu_cblist_head(&rsp->orphan_pend), rcu_cblist_tail(&rsp->orphan_pend), ql, qll, flags); |