* [PATCH] little de_thread() cleanup
@ 2005-09-18 13:51 Oleg Nesterov
0 siblings, 0 replies; only message in thread
From: Oleg Nesterov @ 2005-09-18 13:51 UTC (permalink / raw)
To: linux-kernel; +Cc: Andrew Morton
Trivial, saves one 'if' branch in de_thread().
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- 2.6.14-rc1/fs/exec.c~3_DETHR 2005-09-17 18:57:28.000000000 +0400
+++ 2.6.14-rc1/fs/exec.c 2005-09-18 20:14:10.000000000 +0400
@@ -639,10 +639,9 @@ static inline int de_thread(struct task_
/*
* 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-18 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-18 13:51 [PATCH] little de_thread() cleanup Oleg Nesterov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®