[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250820101826.GA2484@didi-ThinkCentre-M930t-N000>
Date: Wed, 20 Aug 2025 18:18:46 +0800
From: Tio Zhang <tiozhang@...iglobal.com>
To: <akpm@...ux-foundation.org>
CC: <linux-kernel@...r.kernel.org>, <tiozhang@...iglobal.com>,
<zyhtheonly@...il.com>, <zyhtheonly@...h.net>
Subject: [PATCH] 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.
Signed-off-by: Tio Zhang <tiozhang@...iglobal.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)
Powered by blists - more mailing lists