[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <50a936b7d8f12277d6ec7ed2ef0421a381056909.camel@gmx.de>
Date: Tue, 31 Aug 2021 08:38:19 +0200
From: Mike Galbraith <efault@....de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Subject: [patch] locking, rwsem: Add missing __init_rwsem() for PREEMPT_RT
730633f0b7f95 became the first direct caller of __init_rwsem() vs the
usual init_rwsem(), exposing PREEMPT_RT's lack thereof. Add it.
Signed-off-by: Mike Galbraith <efault@....de>
---
include/linux/rwsem.h | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -152,12 +152,18 @@ static inline void __rwsem_init(struct
}
#endif
+static inline void __init_rwsem(struct rw_semaphore *sem, const char *name,
+ struct lock_class_key *key)
+{
+ init_rwbase_rt(&(sem)->rwbase);
+ __rwsem_init(sem, name, key);
+}
+
#define init_rwsem(sem) \
do { \
static struct lock_class_key __key; \
\
- init_rwbase_rt(&(sem)->rwbase); \
- __rwsem_init((sem), #sem, &__key); \
+ __init_rwsem((sem), #sem, &__key); \
} while (0)
static __always_inline int rwsem_is_locked(struct rw_semaphore *sem)
Powered by blists - more mailing lists