Skip to content

Commit

Permalink
[PATCH] little de_thread() cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Oct 31, 2005
1 parent 833d304 commit 9e4e23b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9e4e23b

Please sign in to comment.