Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ww-mutex: Fix the ww_acquire_ctx function annotations

The ww_acquire_done() call is optional. Reflect this in the annotations of
ww_acquire_done().

Fixes: 47907461e4f6 ("locking/ww_mutex: Support Clang's context analysis")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Marco Elver <elver@google.com>
Link: https://patch.msgid.link/20260225183244.4035378-4-bvanassche@acm.org

authored by

Bart Van Assche and committed by
Peter Zijlstra
3dcef70e 39be7b21

+2 -2
+2 -2
include/linux/ww_mutex.h
··· 181 181 * data structures. 182 182 */ 183 183 static inline void ww_acquire_done(struct ww_acquire_ctx *ctx) 184 - __releases(ctx) __acquires_shared(ctx) __no_context_analysis 184 + __must_hold(ctx) 185 185 { 186 186 #ifdef DEBUG_WW_MUTEXES 187 187 lockdep_assert_held(ctx); ··· 199 199 * mutexes have been released with ww_mutex_unlock. 200 200 */ 201 201 static inline void ww_acquire_fini(struct ww_acquire_ctx *ctx) 202 - __releases_shared(ctx) __no_context_analysis 202 + __releases(ctx) __no_context_analysis 203 203 { 204 204 #ifdef CONFIG_DEBUG_LOCK_ALLOC 205 205 mutex_release(&ctx->first_lock_dep_map, _THIS_IP_);