Skip to content

Commit

Permalink
kernel/locking: Use a pointer in ww_mutex_trylock().
Browse files Browse the repository at this point in the history
mutex_acquire_nest() expects a pointer, pass the pointer.

Fixes: 12235da ("kernel/locking: Add context to ww_mutex_trylock()")
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
  • Loading branch information
Sebastian Andrzej Siewior authored and Peter Zijlstra committed Nov 17, 2021
1 parent fa55b7d commit 2202e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/locking/ww_rt_mutex.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int ww_mutex_trylock(struct ww_mutex *lock, struct ww_acquire_ctx *ww_ctx)

if (__rt_mutex_trylock(&rtm->rtmutex)) {
ww_mutex_set_context_fastpath(lock, ww_ctx);
mutex_acquire_nest(&rtm->dep_map, 0, 1, ww_ctx->dep_map, _RET_IP_);
mutex_acquire_nest(&rtm->dep_map, 0, 1, &ww_ctx->dep_map, _RET_IP_);
return 1;
}

Expand Down

0 comments on commit 2202e15

Please sign in to comment.