diff options
Diffstat (limited to 'kernel/exit.c')
| -rw-r--r-- | kernel/exit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index b14ced3c1..b3f31e8fb 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -476,8 +476,7 @@ static struct task_struct *find_new_reaper(struct task_struct *father) struct pid_namespace *pid_ns = task_active_pid_ns(father); struct task_struct *thread; - thread = father; - while_each_thread(father, thread) { + for_each_thread(father, thread) { if (thread->flags & PF_EXITING) continue; if (unlikely(pid_ns->child_reaper == father)) @@ -514,11 +513,10 @@ static struct task_struct *find_new_reaper(struct task_struct *father) break; if (!reaper->signal->is_child_subreaper) continue; - thread = reaper; - do { + for_each_thread(reaper, thread) { if (!(thread->flags & PF_EXITING)) return thread; - } while_each_thread(reaper, thread); + } } } |
