diff options
author | Mike Galbraith <efault@gmx.de> | 2021-08-31 08:38:19 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-09-02 22:07:17 +0200 |
commit | 15eb7c888e749fbd1cc0370f3d38de08ad903700 (patch) | |
tree | 1de8a6046452f0930fb7c1b3749f82ad9f757aef /include | |
parent | 8596e589b787732c8346f0482919e83cc9362db1 (diff) | |
download | linux-stable-15eb7c888e749fbd1cc0370f3d38de08ad903700.tar.gz linux-stable-15eb7c888e749fbd1cc0370f3d38de08ad903700.tar.bz2 linux-stable-15eb7c888e749fbd1cc0370f3d38de08ad903700.zip |
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.
[ tglx: Move it out of line ]
Signed-off-by: Mike Galbraith <efault@gmx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/50a936b7d8f12277d6ec7ed2ef0421a381056909.camel@gmx.de
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/rwsem.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h index 426e98e0b675..352c6127cb90 100644 --- a/include/linux/rwsem.h +++ b/include/linux/rwsem.h @@ -142,22 +142,14 @@ struct rw_semaphore { #define DECLARE_RWSEM(lockname) \ struct rw_semaphore lockname = __RWSEM_INITIALIZER(lockname) -#ifdef CONFIG_DEBUG_LOCK_ALLOC -extern void __rwsem_init(struct rw_semaphore *rwsem, const char *name, +extern void __init_rwsem(struct rw_semaphore *rwsem, const char *name, struct lock_class_key *key); -#else -static inline void __rwsem_init(struct rw_semaphore *rwsem, const char *name, - struct lock_class_key *key) -{ -} -#endif #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) |