]> 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>
Thu, 27 Jun 2013 23:53:55 +0000 (09:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:38:58 +0000 (16:38 +1000)
commit135bb73ceba969a09df6f9135b6810df9fa275d7
tree327a8bad7861f5b057a870344db8738f72349c1e
parent2e6f5f22d97fbad66422572035f9900a2d459275
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