Messages in this thread Patch in this message | | | Subject | [patch] locking, rwsem: Add missing __init_rwsem() for PREEMPT_RT | From | Mike Galbraith <> | Date | Tue, 31 Aug 2021 08:38:19 +0200 |
| |
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@gmx.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)
| |