rt: Fix rwlocks/rwsem rt_[down_]read_trylock()
rt_read_trylock() and rt_down_read_trylock() take the lock / semaphore
unconditionally when it is write locked. Check read_depth if current
owns the lock. If it's 0 we know it is write locked and return 0.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Showing
Please register or sign in to comment