From: Oleg Nesterov Date: Sun, 30 Oct 2005 23:01:37 +0000 (-0800) Subject: [PATCH] little de_thread() cleanup X-Git-Tag: v2.6.15-rc1~59^2~15^2~123 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e4e23bccb127fac109e765dfb7f9372661cb415;p=linux-2.6 [PATCH] little de_thread() cleanup Trivial, saves one 'if' branch in de_thread(). Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/exec.c b/fs/exec.c index ba73797eb4..1de69cdc0e 100644 --- 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