From d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Mon, 11 Dec 2023 02:45:28 +0000
Subject: [PATCH] add boot partition  size

---
 kernel/include/linux/ww_mutex.h |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/kernel/include/linux/ww_mutex.h b/kernel/include/linux/ww_mutex.h
index 3af7c0e..3145de5 100644
--- a/kernel/include/linux/ww_mutex.h
+++ b/kernel/include/linux/ww_mutex.h
@@ -28,6 +28,14 @@
 	unsigned int is_wait_die;
 };
 
+struct ww_mutex {
+	struct mutex base;
+	struct ww_acquire_ctx *ctx;
+#ifdef CONFIG_DEBUG_MUTEXES
+	struct ww_class *ww_class;
+#endif
+};
+
 struct ww_acquire_ctx {
 	struct task_struct *task;
 	unsigned long stamp;
@@ -45,14 +53,6 @@
 #ifdef CONFIG_DEBUG_WW_MUTEX_SLOWPATH
 	unsigned int deadlock_inject_interval;
 	unsigned int deadlock_inject_countdown;
-#endif
-};
-
-struct ww_mutex {
-	struct mutex base;
-	struct ww_acquire_ctx *ctx;
-#ifdef CONFIG_DEBUG_MUTEXES
-	struct ww_class *ww_class;
 #endif
 };
 
@@ -181,9 +181,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