mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -tip 0/3] locking/mutex: Misc fixlets
@ 2026-02-17 19:15 Davidlohr Bueso
  2026-02-17 19:15 ` [PATCH 1/3] locking/mutex: Rename mutex_init_lockep() Davidlohr Bueso
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Davidlohr Bueso @ 2026-02-17 19:15 UTC (permalink / raw)
  To: peterz, mingo
  Cc: bigeasy, longman, boqun, will, linux-kernel, Davidlohr Bueso

Found while eyeballing recent changes to mutex.c. The first two are fixes for
51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size").

Thanks!

Davidlohr Bueso (3):
  locking/mutex: Rename mutex_init_lockep()
  locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC
  locking/mutex: Add killable flavor to guard definitions

 include/linux/mutex.h  | 9 ++++++---
 kernel/locking/mutex.c | 4 ++--
 2 files changed, 8 insertions(+), 5 deletions(-)

--
2.39.5


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] locking/mutex: Rename mutex_init_lockep()
  2026-02-17 19:15 [PATCH -tip 0/3] locking/mutex: Misc fixlets Davidlohr Bueso
@ 2026-02-17 19:15 ` Davidlohr Bueso
  2026-02-19  8:32   ` Peter Zijlstra
                     ` (2 more replies)
  2026-02-17 19:15 ` [PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC Davidlohr Bueso
  2026-02-17 19:15 ` [PATCH 3/3] locking/mutex: Add killable flavor to guard definitions Davidlohr Bueso
  2 siblings, 3 replies; 10+ messages in thread
From: Davidlohr Bueso @ 2026-02-17 19:15 UTC (permalink / raw)
  To: peterz, mingo
  Cc: bigeasy, longman, boqun, will, linux-kernel, Davidlohr Bueso

Typo, this wants to be _lockdep().

Fixes: 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 include/linux/mutex.h  | 4 ++--
 kernel/locking/mutex.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index ecaa0440f6ec..8126da959088 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -87,12 +87,12 @@ do {									\
 	struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key);
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key);
 
 static inline void __mutex_init(struct mutex *lock, const char *name,
 				struct lock_class_key *key)
 {
-	mutex_init_lockep(lock, name, key);
+	mutex_init_lockdep(lock, name, key);
 }
 #else
 extern void mutex_init_generic(struct mutex *lock);
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 2a1d165b3167..c867f6c15530 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -171,7 +171,7 @@ static __always_inline bool __mutex_unlock_fast(struct mutex *lock)
 
 #else /* !CONFIG_DEBUG_LOCK_ALLOC */
 
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key)
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key)
 {
 	__mutex_init_generic(lock);
 
@@ -181,7 +181,7 @@ void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_k
 	debug_check_no_locks_freed((void *)lock, sizeof(*lock));
 	lockdep_init_map_wait(&lock->dep_map, name, key, 0, LD_WAIT_SLEEP);
 }
-EXPORT_SYMBOL(mutex_init_lockep);
+EXPORT_SYMBOL(mutex_init_lockdep);
 #endif /* !CONFIG_DEBUG_LOCK_ALLOC */
 
 static inline void __mutex_set_flag(struct mutex *lock, unsigned long flag)
-- 
2.39.5


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC
  2026-02-17 19:15 [PATCH -tip 0/3] locking/mutex: Misc fixlets Davidlohr Bueso
  2026-02-17 19:15 ` [PATCH 1/3] locking/mutex: Rename mutex_init_lockep() Davidlohr Bueso
@ 2026-02-17 19:15 ` Davidlohr Bueso
  2026-02-19 13:31   ` Waiman Long
  2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso
  2026-02-17 19:15 ` [PATCH 3/3] locking/mutex: Add killable flavor to guard definitions Davidlohr Bueso
  2 siblings, 2 replies; 10+ messages in thread
From: Davidlohr Bueso @ 2026-02-17 19:15 UTC (permalink / raw)
  To: peterz, mingo
  Cc: bigeasy, longman, boqun, will, linux-kernel, Davidlohr Bueso

... that endif block should be CONFIG_DEBUG_LOCK_ALLOC, not
CONFIG_LOCKDEP.

Fixes: 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 include/linux/mutex.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index 8126da959088..f57d2a97da57 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -146,7 +146,7 @@ static inline void __mutex_init(struct mutex *lock, const char *name,
 {
 	mutex_rt_init_generic(lock);
 }
-#endif /* !CONFIG_LOCKDEP */
+#endif /* !CONFIG_DEBUG_LOCK_ALLOC */
 #endif /* CONFIG_PREEMPT_RT */
 
 #ifdef CONFIG_DEBUG_MUTEXES
-- 
2.39.5


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 3/3] locking/mutex: Add killable flavor to guard definitions
  2026-02-17 19:15 [PATCH -tip 0/3] locking/mutex: Misc fixlets Davidlohr Bueso
  2026-02-17 19:15 ` [PATCH 1/3] locking/mutex: Rename mutex_init_lockep() Davidlohr Bueso
  2026-02-17 19:15 ` [PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC Davidlohr Bueso
@ 2026-02-17 19:15 ` Davidlohr Bueso
  2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso
  2 siblings, 1 reply; 10+ messages in thread
From: Davidlohr Bueso @ 2026-02-17 19:15 UTC (permalink / raw)
  To: peterz, mingo
  Cc: bigeasy, longman, boqun, will, linux-kernel, Davidlohr Bueso

The mutex guard family defines _try and _intr variants but is missing
the killable one.

Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
---
 include/linux/mutex.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index f57d2a97da57..2f648ee204e7 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -253,6 +253,7 @@ extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock) __cond_a
 DEFINE_LOCK_GUARD_1(mutex, struct mutex, mutex_lock(_T->lock), mutex_unlock(_T->lock))
 DEFINE_LOCK_GUARD_1_COND(mutex, _try, mutex_trylock(_T->lock))
 DEFINE_LOCK_GUARD_1_COND(mutex, _intr, mutex_lock_interruptible(_T->lock), _RET == 0)
+DEFINE_LOCK_GUARD_1_COND(mutex, _kill, mutex_lock_killable(_T->lock), _RET == 0)
 DEFINE_LOCK_GUARD_1(mutex_init, struct mutex, mutex_init(_T->lock), /* */)
 
 DECLARE_LOCK_GUARD_1_ATTRS(mutex,	__acquires(_T), __releases(*(struct mutex **)_T))
@@ -261,6 +262,8 @@ DECLARE_LOCK_GUARD_1_ATTRS(mutex_try,	__acquires(_T), __releases(*(struct mutex
 #define class_mutex_try_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_try, _T)
 DECLARE_LOCK_GUARD_1_ATTRS(mutex_intr,	__acquires(_T), __releases(*(struct mutex **)_T))
 #define class_mutex_intr_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_intr, _T)
+DECLARE_LOCK_GUARD_1_ATTRS(mutex_kill,	__acquires(_T), __releases(*(struct mutex **)_T))
+#define class_mutex_kill_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_kill, _T)
 DECLARE_LOCK_GUARD_1_ATTRS(mutex_init,	__acquires(_T), __releases(*(struct mutex **)_T))
 #define class_mutex_init_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_init, _T)
 
-- 
2.39.5


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] locking/mutex: Rename mutex_init_lockep()
  2026-02-17 19:15 ` [PATCH 1/3] locking/mutex: Rename mutex_init_lockep() Davidlohr Bueso
@ 2026-02-19  8:32   ` Peter Zijlstra
  2026-02-19 13:25   ` Waiman Long
  2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso
  2 siblings, 0 replies; 10+ messages in thread
From: Peter Zijlstra @ 2026-02-19  8:32 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: mingo, bigeasy, longman, boqun, will, linux-kernel

On Tue, Feb 17, 2026 at 11:15:10AM -0800, Davidlohr Bueso wrote:
> Typo, this wants to be _lockdep().

Lol... I *never* saw that until just now.

Reading is hard I suppose :-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] locking/mutex: Rename mutex_init_lockep()
  2026-02-17 19:15 ` [PATCH 1/3] locking/mutex: Rename mutex_init_lockep() Davidlohr Bueso
  2026-02-19  8:32   ` Peter Zijlstra
@ 2026-02-19 13:25   ` Waiman Long
  2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso
  2 siblings, 0 replies; 10+ messages in thread
From: Waiman Long @ 2026-02-19 13:25 UTC (permalink / raw)
  To: Davidlohr Bueso, peterz, mingo; +Cc: bigeasy, boqun, will, linux-kernel

On 2/17/26 2:15 PM, Davidlohr Bueso wrote:
> Typo, this wants to be _lockdep().
>
> Fixes: 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
>   include/linux/mutex.h  | 4 ++--
>   kernel/locking/mutex.c | 4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/mutex.h b/include/linux/mutex.h
> index ecaa0440f6ec..8126da959088 100644
> --- a/include/linux/mutex.h
> +++ b/include/linux/mutex.h
> @@ -87,12 +87,12 @@ do {									\
>   	struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
>   
>   #ifdef CONFIG_DEBUG_LOCK_ALLOC
> -void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key);
> +void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key);
>   
>   static inline void __mutex_init(struct mutex *lock, const char *name,
>   				struct lock_class_key *key)
>   {
> -	mutex_init_lockep(lock, name, key);
> +	mutex_init_lockdep(lock, name, key);
>   }
>   #else
>   extern void mutex_init_generic(struct mutex *lock);
> diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
> index 2a1d165b3167..c867f6c15530 100644
> --- a/kernel/locking/mutex.c
> +++ b/kernel/locking/mutex.c
> @@ -171,7 +171,7 @@ static __always_inline bool __mutex_unlock_fast(struct mutex *lock)
>   
>   #else /* !CONFIG_DEBUG_LOCK_ALLOC */
>   
> -void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key)
> +void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key)
>   {
>   	__mutex_init_generic(lock);
>   
> @@ -181,7 +181,7 @@ void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_k
>   	debug_check_no_locks_freed((void *)lock, sizeof(*lock));
>   	lockdep_init_map_wait(&lock->dep_map, name, key, 0, LD_WAIT_SLEEP);
>   }
> -EXPORT_SYMBOL(mutex_init_lockep);
> +EXPORT_SYMBOL(mutex_init_lockdep);
>   #endif /* !CONFIG_DEBUG_LOCK_ALLOC */
>   
>   static inline void __mutex_set_flag(struct mutex *lock, unsigned long flag)

Yes, this typo can be easy to miss.

Acked-by: Waiman Long <longman@redhat.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC
  2026-02-17 19:15 ` [PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC Davidlohr Bueso
@ 2026-02-19 13:31   ` Waiman Long
  2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso
  1 sibling, 0 replies; 10+ messages in thread
From: Waiman Long @ 2026-02-19 13:31 UTC (permalink / raw)
  To: Davidlohr Bueso, peterz, mingo; +Cc: bigeasy, boqun, will, linux-kernel


On 2/17/26 2:15 PM, Davidlohr Bueso wrote:
> ... that endif block should be CONFIG_DEBUG_LOCK_ALLOC, not
> CONFIG_LOCKDEP.
>
> Fixes: 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
> ---
>   include/linux/mutex.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/mutex.h b/include/linux/mutex.h
> index 8126da959088..f57d2a97da57 100644
> --- a/include/linux/mutex.h
> +++ b/include/linux/mutex.h
> @@ -146,7 +146,7 @@ static inline void __mutex_init(struct mutex *lock, const char *name,
>   {
>   	mutex_rt_init_generic(lock);
>   }
> -#endif /* !CONFIG_LOCKDEP */
> +#endif /* !CONFIG_DEBUG_LOCK_ALLOC */
>   #endif /* CONFIG_PREEMPT_RT */
>   
>   #ifdef CONFIG_DEBUG_MUTEXES
Reviewed-by: Waiman Long <longman@redhat.com>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [tip: locking/core] locking/mutex: Add killable flavor to guard definitions
  2026-02-17 19:15 ` [PATCH 3/3] locking/mutex: Add killable flavor to guard definitions Davidlohr Bueso
@ 2026-02-23 10:25   ` tip-bot2 for Davidlohr Bueso
  0 siblings, 0 replies; 10+ messages in thread
From: tip-bot2 for Davidlohr Bueso @ 2026-02-23 10:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Davidlohr Bueso, Peter Zijlstra (Intel), x86, linux-kernel

The following commit has been merged into the locking/core branch of tip:

Commit-ID:     50214dc4382055352fb1d7b9779550dabf5059e5
Gitweb:        https://git.kernel.org/tip/50214dc4382055352fb1d7b9779550dabf5059e5
Author:        Davidlohr Bueso <dave@stgolabs.net>
AuthorDate:    Tue, 17 Feb 2026 11:15:12 -08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 23 Feb 2026 11:19:16 +01:00

locking/mutex: Add killable flavor to guard definitions

The mutex guard family defines _try and _intr variants but is missing
the killable one.

Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260217191512.1180151-4-dave@stgolabs.net
---
 include/linux/mutex.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index f57d2a9..2f648ee 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -253,6 +253,7 @@ extern int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock) __cond_a
 DEFINE_LOCK_GUARD_1(mutex, struct mutex, mutex_lock(_T->lock), mutex_unlock(_T->lock))
 DEFINE_LOCK_GUARD_1_COND(mutex, _try, mutex_trylock(_T->lock))
 DEFINE_LOCK_GUARD_1_COND(mutex, _intr, mutex_lock_interruptible(_T->lock), _RET == 0)
+DEFINE_LOCK_GUARD_1_COND(mutex, _kill, mutex_lock_killable(_T->lock), _RET == 0)
 DEFINE_LOCK_GUARD_1(mutex_init, struct mutex, mutex_init(_T->lock), /* */)
 
 DECLARE_LOCK_GUARD_1_ATTRS(mutex,	__acquires(_T), __releases(*(struct mutex **)_T))
@@ -261,6 +262,8 @@ DECLARE_LOCK_GUARD_1_ATTRS(mutex_try,	__acquires(_T), __releases(*(struct mutex 
 #define class_mutex_try_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_try, _T)
 DECLARE_LOCK_GUARD_1_ATTRS(mutex_intr,	__acquires(_T), __releases(*(struct mutex **)_T))
 #define class_mutex_intr_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_intr, _T)
+DECLARE_LOCK_GUARD_1_ATTRS(mutex_kill,	__acquires(_T), __releases(*(struct mutex **)_T))
+#define class_mutex_kill_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_kill, _T)
 DECLARE_LOCK_GUARD_1_ATTRS(mutex_init,	__acquires(_T), __releases(*(struct mutex **)_T))
 #define class_mutex_init_constructor(_T) WITH_LOCK_GUARD_1_ATTRS(mutex_init, _T)
 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [tip: locking/core] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC
  2026-02-17 19:15 ` [PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC Davidlohr Bueso
  2026-02-19 13:31   ` Waiman Long
@ 2026-02-23 10:25   ` tip-bot2 for Davidlohr Bueso
  1 sibling, 0 replies; 10+ messages in thread
From: tip-bot2 for Davidlohr Bueso @ 2026-02-23 10:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Davidlohr Bueso, Peter Zijlstra (Intel), x86, linux-kernel

The following commit has been merged into the locking/core branch of tip:

Commit-ID:     babcde3be8c9148aa60a14b17831e8f249854963
Gitweb:        https://git.kernel.org/tip/babcde3be8c9148aa60a14b17831e8f249854963
Author:        Davidlohr Bueso <dave@stgolabs.net>
AuthorDate:    Tue, 17 Feb 2026 11:15:11 -08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 23 Feb 2026 11:19:16 +01:00

locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC

... that endif block should be CONFIG_DEBUG_LOCK_ALLOC, not
CONFIG_LOCKDEP.

Fixes: 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260217191512.1180151-3-dave@stgolabs.net
---
 include/linux/mutex.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index 8126da9..f57d2a9 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -146,7 +146,7 @@ static inline void __mutex_init(struct mutex *lock, const char *name,
 {
 	mutex_rt_init_generic(lock);
 }
-#endif /* !CONFIG_LOCKDEP */
+#endif /* !CONFIG_DEBUG_LOCK_ALLOC */
 #endif /* CONFIG_PREEMPT_RT */
 
 #ifdef CONFIG_DEBUG_MUTEXES

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [tip: locking/core] locking/mutex: Rename mutex_init_lockep()
  2026-02-17 19:15 ` [PATCH 1/3] locking/mutex: Rename mutex_init_lockep() Davidlohr Bueso
  2026-02-19  8:32   ` Peter Zijlstra
  2026-02-19 13:25   ` Waiman Long
@ 2026-02-23 10:25   ` tip-bot2 for Davidlohr Bueso
  2 siblings, 0 replies; 10+ messages in thread
From: tip-bot2 for Davidlohr Bueso @ 2026-02-23 10:25 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Davidlohr Bueso, Peter Zijlstra (Intel), x86, linux-kernel

The following commit has been merged into the locking/core branch of tip:

Commit-ID:     8b65eb52d93e4e496bd26e6867152344554eb39e
Gitweb:        https://git.kernel.org/tip/8b65eb52d93e4e496bd26e6867152344554eb39e
Author:        Davidlohr Bueso <dave@stgolabs.net>
AuthorDate:    Tue, 17 Feb 2026 11:15:10 -08:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 23 Feb 2026 11:19:15 +01:00

locking/mutex: Rename mutex_init_lockep()

Typo, this wants to be _lockdep().

Fixes: 51d7a054521d ("locking/mutex: Redo __mutex_init() to reduce generated code size")
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260217191512.1180151-2-dave@stgolabs.net
---
 include/linux/mutex.h  | 4 ++--
 kernel/locking/mutex.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index ecaa044..8126da9 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -87,12 +87,12 @@ do {									\
 	struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
 
 #ifdef CONFIG_DEBUG_LOCK_ALLOC
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key);
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key);
 
 static inline void __mutex_init(struct mutex *lock, const char *name,
 				struct lock_class_key *key)
 {
-	mutex_init_lockep(lock, name, key);
+	mutex_init_lockdep(lock, name, key);
 }
 #else
 extern void mutex_init_generic(struct mutex *lock);
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index 2a1d165..c867f6c 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -171,7 +171,7 @@ static __always_inline bool __mutex_unlock_fast(struct mutex *lock)
 
 #else /* !CONFIG_DEBUG_LOCK_ALLOC */
 
-void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_key *key)
+void mutex_init_lockdep(struct mutex *lock, const char *name, struct lock_class_key *key)
 {
 	__mutex_init_generic(lock);
 
@@ -181,7 +181,7 @@ void mutex_init_lockep(struct mutex *lock, const char *name, struct lock_class_k
 	debug_check_no_locks_freed((void *)lock, sizeof(*lock));
 	lockdep_init_map_wait(&lock->dep_map, name, key, 0, LD_WAIT_SLEEP);
 }
-EXPORT_SYMBOL(mutex_init_lockep);
+EXPORT_SYMBOL(mutex_init_lockdep);
 #endif /* !CONFIG_DEBUG_LOCK_ALLOC */
 
 static inline void __mutex_set_flag(struct mutex *lock, unsigned long flag)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-02-23 10:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-17 19:15 [PATCH -tip 0/3] locking/mutex: Misc fixlets Davidlohr Bueso
2026-02-17 19:15 ` [PATCH 1/3] locking/mutex: Rename mutex_init_lockep() Davidlohr Bueso
2026-02-19  8:32   ` Peter Zijlstra
2026-02-19 13:25   ` Waiman Long
2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso
2026-02-17 19:15 ` [PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC Davidlohr Bueso
2026-02-19 13:31   ` Waiman Long
2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso
2026-02-17 19:15 ` [PATCH 3/3] locking/mutex: Add killable flavor to guard definitions Davidlohr Bueso
2026-02-23 10:25   ` [tip: locking/core] " tip-bot2 for Davidlohr Bueso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®