[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-bb8cbbfee68518796df4050868e5b0f5ad078f9f@git.kernel.org>
Date: Wed, 27 Nov 2013 06:10:10 -0800
From: tip-bot for Oleg Nesterov <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
torvalds@...ux-foundation.org, peterz@...radead.org,
David.Laight@...LAB.COM, geert@...ux-m68k.org,
akpm@...ux-foundation.org, tj@...nel.org, tglx@...utronix.de,
oleg@...hat.com
Subject: [tip:sched/core] tasks/fork: Remove unnecessary child->exit_state
Commit-ID: bb8cbbfee68518796df4050868e5b0f5ad078f9f
Gitweb: http://git.kernel.org/tip/bb8cbbfee68518796df4050868e5b0f5ad078f9f
Author: Oleg Nesterov <oleg@...hat.com>
AuthorDate: Wed, 13 Nov 2013 15:36:12 +0100
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 27 Nov 2013 13:50:50 +0100
tasks/fork: Remove unnecessary child->exit_state
A zombie task obviously can't fork(), remove the unnecessary
initialization of child->exit_state. It is zero anyway after
dup_task_struct().
Note: copy_process() is huge and it has a lot of chaotic
initializations, probably it makes sense to move them into the
new helper called by dup_task_struct().
Signed-off-by: Oleg Nesterov <oleg@...hat.com>
Cc: David Laight <David.Laight@...LAB.COM>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Tejun Heo <tj@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/20131113143612.GA10540@redhat.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/fork.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index 728d5be..b308082 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1402,13 +1402,11 @@ static struct task_struct *copy_process(unsigned long clone_flags,
p->tgid = p->pid;
}
- p->pdeath_signal = 0;
- p->exit_state = 0;
-
p->nr_dirtied = 0;
p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10);
p->dirty_paused_when = 0;
+ p->pdeath_signal = 0;
INIT_LIST_HEAD(&p->thread_group);
p->task_works = NULL;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists