linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fork: remove #ifdef CONFIG_LOCKDEP in copy_process()
@ 2025-08-20 10:18 Tio Zhang
  0 siblings, 0 replies; only message in thread
From: Tio Zhang @ 2025-08-20 10:18 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, tiozhang, zyhtheonly, zyhtheonly

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)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-20 10:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20 10:18 [PATCH] fork: remove #ifdef CONFIG_LOCKDEP in copy_process() Tio Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).