1
0

fork: remove #ifdef CONFIG_LOCKDEP in copy_process()

lockdep_init_task() is defined as an empty when CONFIG_LOCKDEP is not set.
So the #ifdef here is redundant, remove it.

Link: https://lkml.kernel.org/r/20250820101826.GA2484@didi-ThinkCentre-M930t-N000
Signed-off-by: Tio Zhang <tiozhang@didiglobal.com>
Cc: Kees Cook <kees@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Tio Zhang
2025-08-20 18:18:46 +08:00
committed by Andrew Morton
parent 2a8c51bc93
commit b32730e68d

View File

@@ -2124,9 +2124,7 @@ __latent_entropy struct task_struct *copy_process(
p->pagefault_disabled = 0;
#ifdef CONFIG_LOCKDEP
lockdep_init_task(p);
#endif
p->blocked_on = NULL; /* not blocked yet */