summaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorYuyang Du2019-05-06 10:19:23 +0200
committerIngo Molnar2019-06-03 11:55:42 +0200
commite196e479a3b844da6e6e71e0d2a8694040cb4e52 (patch)
tree3d6c6505da33833db9e844774871356ed29055d7 /kernel/fork.c
parentlocking/lockdep: Update obsolete struct field description (diff)
downloadkernel-qcow2-linux-e196e479a3b844da6e6e71e0d2a8694040cb4e52.tar.gz
kernel-qcow2-linux-e196e479a3b844da6e6e71e0d2a8694040cb4e52.tar.xz
kernel-qcow2-linux-e196e479a3b844da6e6e71e0d2a8694040cb4e52.zip
locking/lockdep: Use lockdep_init_task for task initiation consistently
Despite that there is a lockdep_init_task() which does nothing, lockdep initiates tasks by assigning lockdep fields and does so inconsistently. Fix this by using lockdep_init_task(). Signed-off-by: Yuyang Du <duyuyang@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: bvanassche@acm.org Cc: frederic@kernel.org Cc: ming.lei@redhat.com Cc: will.deacon@arm.com Link: https://lkml.kernel.org/r/20190506081939.74287-8-duyuyang@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 75675b9bf6df..735d0b4a89e2 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1984,9 +1984,6 @@ static __latent_entropy struct task_struct *copy_process(
p->pagefault_disabled = 0;
#ifdef CONFIG_LOCKDEP
- p->lockdep_depth = 0; /* no locks held yet */
- p->curr_chain_key = 0;
- p->lockdep_recursion = 0;
lockdep_init_task(p);
#endif