From 102a0743326a03cd1a1202ceda21e175b7d3575c Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Tue, 20 Feb 2024 01:20:52 +0000 Subject: [PATCH] add new system file --- kernel/include/linux/ww_mutex.h | 13 +++---------- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/kernel/include/linux/ww_mutex.h b/kernel/include/linux/ww_mutex.h index 3af7c0e..6ecf2a0 100644 --- a/kernel/include/linux/ww_mutex.h +++ b/kernel/include/linux/ww_mutex.h @@ -48,14 +48,6 @@ #endif }; -struct ww_mutex { - struct mutex base; - struct ww_acquire_ctx *ctx; -#ifdef CONFIG_DEBUG_MUTEXES - struct ww_class *ww_class; -#endif -}; - #ifdef CONFIG_DEBUG_LOCK_ALLOC # define __WW_CLASS_MUTEX_INITIALIZER(lockname, class) \ , .ww_class = class @@ -181,9 +173,10 @@ */ static inline void ww_acquire_fini(struct ww_acquire_ctx *ctx) { +#ifdef CONFIG_DEBUG_LOCK_ALLOC + mutex_release(&ctx->dep_map, _THIS_IP_); +#endif #ifdef CONFIG_DEBUG_MUTEXES - mutex_release(&ctx->dep_map, 0, _THIS_IP_); - DEBUG_LOCKS_WARN_ON(ctx->acquired); if (!IS_ENABLED(CONFIG_PROVE_LOCKING)) /* -- Gitblit v1.6.2