| .. | .. |
|---|
| 48 | 48 | #endif |
|---|
| 49 | 49 | }; |
|---|
| 50 | 50 | |
|---|
| 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 | | - |
|---|
| 59 | 51 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
|---|
| 60 | 52 | # define __WW_CLASS_MUTEX_INITIALIZER(lockname, class) \ |
|---|
| 61 | 53 | , .ww_class = class |
|---|
| .. | .. |
|---|
| 181 | 173 | */ |
|---|
| 182 | 174 | static inline void ww_acquire_fini(struct ww_acquire_ctx *ctx) |
|---|
| 183 | 175 | { |
|---|
| 176 | +#ifdef CONFIG_DEBUG_LOCK_ALLOC |
|---|
| 177 | + mutex_release(&ctx->dep_map, _THIS_IP_); |
|---|
| 178 | +#endif |
|---|
| 184 | 179 | #ifdef CONFIG_DEBUG_MUTEXES |
|---|
| 185 | | - mutex_release(&ctx->dep_map, 0, _THIS_IP_); |
|---|
| 186 | | - |
|---|
| 187 | 180 | DEBUG_LOCKS_WARN_ON(ctx->acquired); |
|---|
| 188 | 181 | if (!IS_ENABLED(CONFIG_PROVE_LOCKING)) |
|---|
| 189 | 182 | /* |
|---|