Skip to content

Commit f7efc47

Browse files
KAGA-KOKOIngo Molnar
authored andcommitted
locking/rtmutex: Inline chainwalk depth check
There is no point for this wrapper at all. Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent fae37fe commit f7efc47

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

kernel/locking/rtmutex.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -343,14 +343,9 @@ static void rt_mutex_adjust_prio(struct task_struct *p)
343343
static bool rt_mutex_cond_detect_deadlock(struct rt_mutex_waiter *waiter,
344344
enum rtmutex_chainwalk chwalk)
345345
{
346-
/*
347-
* This is just a wrapper function for the following call,
348-
* because debug_rt_mutex_detect_deadlock() smells like a magic
349-
* debug feature and I wanted to keep the cond function in the
350-
* main source file along with the comments instead of having
351-
* two of the same in the headers.
352-
*/
353-
return debug_rt_mutex_detect_deadlock(waiter, chwalk);
346+
if (IS_ENABLED(CONFIG_DEBUG_RT_MUTEX))
347+
return waiter != NULL;
348+
return chwalk == RT_MUTEX_FULL_CHAINWALK;
354349
}
355350

356351
/*

0 commit comments

Comments
 (0)