Skip to content

Commit 1dfe5ea

Browse files
ranxiaokaifbq
authored andcommitted
locking/mutex: Remove redundant #ifdefs
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 <[email protected]> Acked-by: Waiman Long <[email protected]> Signed-off-by: Boqun Feng <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent bd27cfb commit 1dfe5ea

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

kernel/locking/mutex.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ static void
191191
__mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter,
192192
struct list_head *list)
193193
{
194-
#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
195194
hung_task_set_blocker(lock, BLOCKER_TYPE_MUTEX);
196-
#endif
197195
debug_mutex_add_waiter(lock, waiter, current);
198196

199197
list_add_tail(&waiter->list, list);
@@ -209,9 +207,7 @@ __mutex_remove_waiter(struct mutex *lock, struct mutex_waiter *waiter)
209207
__mutex_clear_flag(lock, MUTEX_FLAGS);
210208

211209
debug_mutex_remove_waiter(lock, waiter, current);
212-
#ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER
213210
hung_task_clear_blocker();
214-
#endif
215211
}
216212

217213
/*

0 commit comments

Comments
 (0)