[PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC

Davidlohr Bueso posted 3 patches 1 month, 2 weeks ago
[PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC
Posted by Davidlohr Bueso 1 month, 2 weeks ago
... 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
Re: [PATCH 2/3] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC
Posted by Waiman Long 1 month, 1 week ago
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>
[tip: locking/core] locking/mutex: Fix wrong comment for CONFIG_DEBUG_LOCK_ALLOC
Posted by tip-bot2 for Davidlohr Bueso 1 month, 1 week ago
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