[PATCH] little de_thread() cleanup
authorOleg Nesterov <oleg@tv-sign.ru>
Sun, 30 Oct 2005 23:01:37 +0000 (15:01 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:17 +0000 (17:37 -0800)
Trivial, saves one 'if' branch in de_thread().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/exec.c

index ba73797eb4cbcf628907a5db58a2087cbf6d45c8..1de69cdc0e6c5433c0ebf5d6a94bcf3b319b5c8b 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -630,10 +630,9 @@ static inline int de_thread(struct task_struct *tsk)
        /*
         * Account for the thread group leader hanging around:
         */
-       count = 2;
-       if (thread_group_leader(current))
-               count = 1;
-       else {
+       count = 1;
+       if (!thread_group_leader(current)) {
+               count = 2;
                /*
                 * The SIGALRM timer survives the exec, but needs to point
                 * at us as the new group leader now.  We have a race with