Skip to content

Commit

Permalink
locking/rtmutex: Inline chainwalk depth check
Browse files Browse the repository at this point in the history
There is no point for this wrapper at all.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210326153943.754254046@linutronix.de
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Mar 29, 2021
1 parent fae37fe commit f7efc47
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions kernel/locking/rtmutex.c
Original file line number Diff line number Diff line change
@@ -343,14 +343,9 @@ static void rt_mutex_adjust_prio(struct task_struct *p)
static bool rt_mutex_cond_detect_deadlock(struct rt_mutex_waiter *waiter,
enum rtmutex_chainwalk chwalk)
{
/*
* This is just a wrapper function for the following call,
* because debug_rt_mutex_detect_deadlock() smells like a magic
* debug feature and I wanted to keep the cond function in the
* main source file along with the comments instead of having
* two of the same in the headers.
*/
return debug_rt_mutex_detect_deadlock(waiter, chwalk);
if (IS_ENABLED(CONFIG_DEBUG_RT_MUTEX))
return waiter != NULL;
return chwalk == RT_MUTEX_FULL_CHAINWALK;
}

/*

0 comments on commit f7efc47

Please sign in to comment.