summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/locking-Remove-rt_rwlock_is_contended.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/locking-Remove-rt_rwlock_is_contended.patch')
-rw-r--r--debian/patches-rt/locking-Remove-rt_rwlock_is_contended.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches-rt/locking-Remove-rt_rwlock_is_contended.patch b/debian/patches-rt/locking-Remove-rt_rwlock_is_contended.patch
new file mode 100644
index 000000000..43b227a54
--- /dev/null
+++ b/debian/patches-rt/locking-Remove-rt_rwlock_is_contended.patch
@@ -0,0 +1,34 @@
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Tue, 7 Sep 2021 12:11:47 +0200
+Subject: [PATCH] locking: Remove rt_rwlock_is_contended()
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz
+
+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 <lkp@intel.com>
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+---
+ kernel/locking/spinlock_rt.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/kernel/locking/spinlock_rt.c
++++ b/kernel/locking/spinlock_rt.c
+@@ -257,12 +257,6 @@ void __sched rt_write_unlock(rwlock_t *r
+ }
+ EXPORT_SYMBOL(rt_write_unlock);
+
+-int __sched rt_rwlock_is_contended(rwlock_t *rwlock)
+-{
+- return rw_base_is_contended(&rwlock->rwbase);
+-}
+-EXPORT_SYMBOL(rt_rwlock_is_contended);
+-
+ #ifdef CONFIG_DEBUG_LOCK_ALLOC
+ void __rt_rwlock_init(rwlock_t *rwlock, const char *name,
+ struct lock_class_key *key)