Skip to content

Commit 10e8834

Browse files
bvanasschegregkh
authored andcommitted
ww-mutex: Fix the ww_acquire_ctx function annotations
[ Upstream commit 3dcef70 ] The ww_acquire_done() call is optional. Reflect this in the annotations of ww_acquire_done(). Fixes: 4790746 ("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 Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 8039913 commit 10e8834

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/linux/ww_mutex.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ static inline void ww_acquire_init(struct ww_acquire_ctx *ctx,
181181
* data structures.
182182
*/
183183
static inline void ww_acquire_done(struct ww_acquire_ctx *ctx)
184-
__releases(ctx) __acquires_shared(ctx) __no_context_analysis
184+
__must_hold(ctx)
185185
{
186186
#ifdef DEBUG_WW_MUTEXES
187187
lockdep_assert_held(ctx);
@@ -199,7 +199,7 @@ static inline void ww_acquire_done(struct ww_acquire_ctx *ctx)
199199
* mutexes have been released with ww_mutex_unlock.
200200
*/
201201
static inline void ww_acquire_fini(struct ww_acquire_ctx *ctx)
202-
__releases_shared(ctx) __no_context_analysis
202+
__releases(ctx) __no_context_analysis
203203
{
204204
#ifdef CONFIG_DEBUG_LOCK_ALLOC
205205
mutex_release(&ctx->first_lock_dep_map, _THIS_IP_);

0 commit comments

Comments
 (0)