rcu: Initialize and destroy rcu_synchronize only when necessary
authorWei Yang <richard.weiyang@gmail.com>
Wed, 15 Apr 2020 22:26:55 +0000 (22:26 +0000)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 29 Jun 2020 18:58:49 +0000 (11:58 -0700)
commit7ee880b7bf1dea88d0a472b775aebdb4fb6bf860
tree18e3addaf589f8769016e53b649fbb96a15fd498
parent9ebcfadb0610322ac537dd7aa5d9cbc2b2894c68
rcu: Initialize and destroy rcu_synchronize only when necessary

The __wait_rcu_gp() function unconditionally initializes and cleans up
each element of rs_array[], whether used or not.  This is slightly
wasteful and rather confusing, so this commit skips both initialization
and cleanup for duplicate callback functions.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/update.c