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:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user