From 80c2a9728e298925c8d099692e8efbb3c45cc7d7 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <>
Date: Tue, 7 Sep 2021 12:11:47 +0200
Subject: [PATCH 076/166] locking: Remove rt_rwlock_is_contended()

rt_rwlock_is_contended() has not users. It makes no sense to use it as
rwlock_is_contended() because it is a sleeping lock on RT and preemption
is possible. It reports always != 0 if used by a writer and even if
there is a waiter then the lock might not be handed over if the
current owner has the highest priority.

Remove rt_rwlock_is_contended().

Reported-by: kernel test robot <>
Signed-off-by: Sebastian Andrzej Siewior <>
 kernel/locking/spinlock_rt.c |    6 ------
 1 file changed, 6 deletions(-)

Index: linux-5.15.13-rt26/kernel/locking/spinlock_rt.c
@ linux-5.15.13-rt26/kernel/locking/spinlock_rt.c:260 @ void __sched rt_write_unlock(rwlock_t *r
-int __sched rt_rwlock_is_contended(rwlock_t *rwlock)
-	return rw_base_is_contended(&rwlock->rwbase);
 void __rt_rwlock_init(rwlock_t *rwlock, const char *name,
 		      struct lock_class_key *key)