diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-03-26 16:29:36 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2021-03-29 15:57:03 +0200 |
commit | f7efc4799f8114ba85b68584f83293f435009de4 (patch) | |
tree | dc2d545f85d523a323713a18e5b4355257081bae /kernel/locking | |
parent | fae37feee096bd3c85f6453713131a471404c6f5 (diff) |
locking/rtmutex: Inline chainwalk depth check
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
Diffstat (limited to 'kernel/locking')
-rw-r--r-- | kernel/locking/rtmutex.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 8a934db4bb1a..2c77e729b820 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -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; } /* |