]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kernel/fork.c:copy_process(): unify CLONE_THREAD-or-thread_group_leader code
authorOleg Nesterov <oleg@redhat.com>
Wed, 19 Jun 2013 00:08:22 +0000 (10:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:42 +0000 (17:27 +1000)
commit9a83c1c978754473944905b86caad7ae1a6ac8d8
tree5f557cd9aeafde273e52c1ac5d12a627d8b0c40c
parent6a0b95be233536f85ffb900c29ff773f47be1208
kernel/fork.c:copy_process(): unify CLONE_THREAD-or-thread_group_leader code

Cleanup and preparation for the next changes.

Move the "if (clone_flags & CLONE_THREAD)" code down under "if
(likely(p->pid))" and turn it into into the "else" branch.  This makes the
process/thread initialization more symmetrical and removes one check.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Sergey Dyasly <dserrg@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/fork.c