[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250716144818.47650-9-boqun.feng@gmail.com>
Date: Wed, 16 Jul 2025 07:48:17 -0700
From: Boqun Feng <boqun.feng@...il.com>
To: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: "Will Deacon" <will@...nel.org>,
"Waiman Long" <longman@...hat.com>,
Miguel Ojeda <ojeda@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
linux-kernel@...r.kernel.org,
rust-for-linux@...r.kernel.org,
Breno Leitao <leitao@...ian.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Ran Xiaokai <ran.xiaokai@....com.cn>,
Boqun Feng <boqun.feng@...il.com>
Subject: [PATCH 8/9] locking/mutex: Remove redundant #ifdefs
From: Ran Xiaokai <ran.xiaokai@....com.cn>
hung_task_{set,clear}_blocker() is already guarded by
CONFIG_DETECT_HUNG_TASK_BLOCKER in hung_task.h, So remove
the redudant check of #ifdef.
Signed-off-by: Ran Xiaokai <ran.xiaokai@....com.cn>
Acked-by: Waiman Long <longman@...hat.com>
Signed-off-by: Boqun Feng <boqun.feng@...il.com>
Link: https://lore.kernel.org/r/20250704015218.359754-1-ranxiaokai627@163.com
---
kernel/locking/mutex.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c
index a39ecccbd106..d4210dc97b6a 100644
--- a/kernel/locking/mutex.c
+++ b/kernel/locking/mutex.c
@@ -191,9 +191,7 @@ static void
__mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
struct list_head *list)
{
-#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
hung_task_set_blocker(lock, BLOCKER_TYPE_MUTEX);
-#endif
debug_mutex_add_waiter(lock, waiter, current);
list_add_tail(&waiter->list, list);
@@ -209,9 +207,7 @@ __mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter)
__mutex_clear_flag(lock, MUTEX_FLAGS);
debug_mutex_remove_waiter(lock, waiter, current);
-#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
hung_task_clear_blocker();
-#endif
}
/*
--
2.39.5 (Apple Git-154)
Powered by blists - more mailing lists