rcu_sync: Cleanup the CONFIG_PROVE_RCU checks
authorOleg Nesterov <oleg@redhat.com>
Fri, 11 Sep 2015 15:59:18 +0000 (17:59 +0200)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 6 Oct 2015 18:25:45 +0000 (11:25 -0700)
commit4bace7344d6dbd7a1b0b801abf24ea9878064317
treed6d2eeb78cbbb002f105a7a0d4d8928c2e4dca29
parentcc5f730b41506d37a5c2826b2e801d0a59853d11
rcu_sync: Cleanup the CONFIG_PROVE_RCU checks

1. Rename __rcu_sync_is_idle() to rcu_sync_lockdep_assert() and
   change it to use rcu_lockdep_assert().

2. Change rcu_sync_is_idle() to return rsp->gp_state == GP_IDLE
   unconditonally, this way we can remove the same check from
   rcu_sync_lockdep_assert() and clearly isolate the debugging
   code.

Note: rcu_sync_enter()->wait_event(gp_state == GP_PASSED) needs
another CONFIG_PROVE_RCU check, the same as is done in ->sync(); but
this needs some simple preparations in the core RCU code to avoid the
code duplication.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
include/linux/rcu_sync.h
kernel/rcu/sync.c