[PATCH] fork: remove #ifdef CONFIG_LOCKDEP in copy_process()

Tio Zhang posted 1 patch 1 month, 2 weeks ago
kernel/fork.c | 2 --
1 file changed, 2 deletions(-)
[PATCH] fork: remove #ifdef CONFIG_LOCKDEP in copy_process()
Posted by Tio Zhang 1 month, 2 weeks ago
lockdep_init_task() is defined as an empty when
CONFIG_LOCKDEP is not set.
So the #ifdef here is redundant, remove it.

Signed-off-by: Tio Zhang <tiozhang@didiglobal.com>
---
 kernel/fork.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index af673856499d..e06cfaa85a84 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -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 */
 
-- 
2.39.3 (Apple Git-145)