diff options
| author | Mark Brown <[email protected]> | 2015-10-12 18:09:27 +0100 | 
|---|---|---|
| committer | Mark Brown <[email protected]> | 2015-10-12 18:09:27 +0100 | 
| commit | 79828b4fa835f73cdaf4bffa48696abdcbea9d02 (patch) | |
| tree | 5e0fa7156acb75ba603022bc807df8f2fedb97a8 /kernel/rcu/srcu.c | |
| parent | 721b51fcf91898299d96f4b72cb9434cda29dce6 (diff) | |
| parent | 8c1a9d6323abf0fb1e5dad96cf3f1c783505ea5a (diff) | |
Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-fix-rt5645
Diffstat (limited to 'kernel/rcu/srcu.c')
| -rw-r--r-- | kernel/rcu/srcu.c | 15 | 
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/rcu/srcu.c b/kernel/rcu/srcu.c index fb33d35ee0b7..d3fcb2ec8536 100644 --- a/kernel/rcu/srcu.c +++ b/kernel/rcu/srcu.c @@ -252,14 +252,15 @@ static bool srcu_readers_active_idx_check(struct srcu_struct *sp, int idx)  }  /** - * srcu_readers_active - returns approximate number of readers. + * srcu_readers_active - returns true if there are readers. and false + *                       otherwise   * @sp: which srcu_struct to count active readers (holding srcu_read_lock).   *   * Note that this is not an atomic primitive, and can therefore suffer   * severe errors when invoked on an active srcu_struct.  That said, it   * can be useful as an error check at cleanup time.   */ -static int srcu_readers_active(struct srcu_struct *sp) +static bool srcu_readers_active(struct srcu_struct *sp)  {  	int cpu;  	unsigned long sum = 0; @@ -414,11 +415,11 @@ static void __synchronize_srcu(struct srcu_struct *sp, int trycount)  	struct rcu_head *head = &rcu.head;  	bool done = false; -	rcu_lockdep_assert(!lock_is_held(&sp->dep_map) && -			   !lock_is_held(&rcu_bh_lock_map) && -			   !lock_is_held(&rcu_lock_map) && -			   !lock_is_held(&rcu_sched_lock_map), -			   "Illegal synchronize_srcu() in same-type SRCU (or RCU) read-side critical section"); +	RCU_LOCKDEP_WARN(lock_is_held(&sp->dep_map) || +			 lock_is_held(&rcu_bh_lock_map) || +			 lock_is_held(&rcu_lock_map) || +			 lock_is_held(&rcu_sched_lock_map), +			 "Illegal synchronize_srcu() in same-type SRCU (or in RCU) read-side critical section");  	might_sleep();  	init_completion(&rcu.completion);  |