From: Oleg Nesterov Date: Wed, 3 Jul 2013 22:08:32 +0000 (-0700) Subject: kernel/fork.c:copy_process(): consolidate the lockless CLONE_THREAD checks X-Git-Tag: omap-for-v3.11/fixes-for-merge-window~17^2~42 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18c830df771f2ba8b4699fea9af1492275ae627b;p=pandora-kernel.git kernel/fork.c:copy_process(): consolidate the lockless CLONE_THREAD checks copy_process() does a lot of "chaotic" initializations and checks CLONE_THREAD twice before it takes tasklist. In particular it sets "p->group_leader = p" and then changes it again under tasklist if !thread_group_leader(p). This looks a bit confusing, lets create a single "if (CLONE_THREAD)" block which initializes ->exit_signal, ->group_leader, and ->tgid. Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Cc: Michal Hocko Cc: Pavel Emelyanov Cc: Sergey Dyasly Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed