mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tio Zhang <tiozhang@didiglobal.com>
To: <akpm@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>, <tiozhang@didiglobal.com>,
	<zyhtheonly@gmail.com>, <zyhtheonly@yeah.net>
Subject: [PATCH] fork: remove #ifdef CONFIG_LOCKDEP in copy_process()
Date: Wed, 20 Aug 2025 18:18:46 +0800	[thread overview]
Message-ID: <20250820101826.GA2484@didi-ThinkCentre-M930t-N000> (raw)

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)


                 reply	other threads:[~2025-08-20 10:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250820101826.GA2484@didi-ThinkCentre-M930t-N000 \
    --to=tiozhang@didiglobal.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zyhtheonly@gmail.com \
    --cc=zyhtheonly@yeah.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®