Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <ran.xiaokai@zte.com.cn>
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Link: https://lore.kernel.org/r/20250704015218.359754-1-ranxiaokai627@163.com

authored by

Ran Xiaokai and committed by
Boqun Feng
1dfe5ea6 bd27cfb5

-4
-4
kernel/locking/mutex.c
··· 191 191 __mutex_add_waiter(struct mutex *lock, struct mutex_waiter *waiter, 192 192 struct list_head *list) 193 193 { 194 - #ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER 195 194 hung_task_set_blocker(lock, BLOCKER_TYPE_MUTEX); 196 - #endif 197 195 debug_mutex_add_waiter(lock, waiter, current); 198 196 199 197 list_add_tail(&waiter->list, list); ··· 207 209 __mutex_clear_flag(lock, MUTEX_FLAGS); 208 210 209 211 debug_mutex_remove_waiter(lock, waiter, current); 210 - #ifdef CONFIG_DETECT_HUNG_TASK_BLOCKER 211 212 hung_task_clear_blocker(); 212 - #endif 213 213 } 214 214 215 215 /*