locking/rtmutex: Move rt_mutex_debug_task_free() to rtmutex.c
authorThomas Gleixner <tglx@linutronix.de>
Fri, 26 Mar 2021 15:29:35 +0000 (16:29 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 29 Mar 2021 13:57:03 +0000 (15:57 +0200)
Prepare for removing the header maze.

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.646359691@linutronix.de
kernel/locking/rtmutex-debug.c
kernel/locking/rtmutex.c

index df584c91710b5e9fde97840e337b662e87560a7f..f1a83ec9c9b07e4dc0696ce73bd431c940cea3c6 100644 (file)
 
 #include "rtmutex_common.h"
 
-void rt_mutex_debug_task_free(struct task_struct *task)
-{
-       DEBUG_LOCKS_WARN_ON(!RB_EMPTY_ROOT(&task->pi_waiters.rb_root));
-       DEBUG_LOCKS_WARN_ON(task->pi_blocked_on);
-}
-
 void debug_rt_mutex_unlock(struct rt_mutex *lock)
 {
        DEBUG_LOCKS_WARN_ON(rt_mutex_owner(lock) != current);
index 96c7c537eab4fad9c7c0b747bde781f8d6279ce9..8a934db4bb1a6c2ef29d55862b1da49931b7531d 100644 (file)
@@ -1813,3 +1813,11 @@ bool rt_mutex_cleanup_proxy_lock(struct rt_mutex *lock,
 
        return cleanup;
 }
+
+#ifdef CONFIG_DEBUG_RT_MUTEXES
+void rt_mutex_debug_task_free(struct task_struct *task)
+{
+       DEBUG_LOCKS_WARN_ON(!RB_EMPTY_ROOT(&task->pi_waiters.rb_root));
+       DEBUG_LOCKS_WARN_ON(task->pi_blocked_on);
+}
+#endif