On Wed, 01 Jun 2016, Peter Zijlstra wrote:
A while back Viro posted a number of 'interesting' mutex_is_locked() users on IRC, one of those was RCU. RCU seems to use mutex_is_locked() to avoid doing mutex_trylock(), the regular load before modify pattern. While the use isn't wrong per se, its curious in that its needed at all, mutex_trylock() should be good enough on its own to avoid the pointless cacheline bounces.
Yeah, and we use ccas just about everywhere else for mutexes.
So fix those and remove the mutex_is_locked() (ab)use from RCU. Reported-by: Al Viro <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Acked-by: Davidlohr Bueso <[email protected]>

