hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/linux/ww_mutex.h
....@@ -48,14 +48,6 @@
4848 #endif
4949 };
5050
51
-struct ww_mutex {
52
- struct mutex base;
53
- struct ww_acquire_ctx *ctx;
54
-#ifdef CONFIG_DEBUG_MUTEXES
55
- struct ww_class *ww_class;
56
-#endif
57
-};
58
-
5951 #ifdef CONFIG_DEBUG_LOCK_ALLOC
6052 # define __WW_CLASS_MUTEX_INITIALIZER(lockname, class) \
6153 , .ww_class = class
....@@ -181,9 +173,10 @@
181173 */
182174 static inline void ww_acquire_fini(struct ww_acquire_ctx *ctx)
183175 {
176
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
177
+ mutex_release(&ctx->dep_map, _THIS_IP_);
178
+#endif
184179 #ifdef CONFIG_DEBUG_MUTEXES
185
- mutex_release(&ctx->dep_map, 0, _THIS_IP_);
186
-
187180 DEBUG_LOCKS_WARN_ON(ctx->acquired);
188181 if (!IS_ENABLED(CONFIG_PROVE_LOCKING))
189182 /*