aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2009-06-17 19:27:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 16:03:51 -0400
commitd1e98f429aa10132b3010ba3b0be47552a2eb14b (patch)
treebd4458a65ac9ff942a3ba6dfcd70c281e15e067a /kernel/exit.c
parent8053bdd5ce15dcf043d41a4dd6cac4a5567effdc (diff)
ptrace: wait_task_zombie: s/->parent/->real_parent/
Change wait_task_zombie() to use ->real_parent instead of ->parent. We could even use current afaics, but ->real_parent is more clean. We know that the child is not ptrace_reparented() and thus they are equal. But we should avoid using task_struct->parent, we are going to remove it. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 938cceebb9ad..826e1dc8168b 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1204,7 +1204,7 @@ static int wait_task_zombie(struct task_struct *p, int options,
1204 * p->signal fields, because they are only touched by 1204 * p->signal fields, because they are only touched by
1205 * __exit_signal, which runs with tasklist_lock 1205 * __exit_signal, which runs with tasklist_lock
1206 * write-locked anyway, and so is excluded here. We do 1206 * write-locked anyway, and so is excluded here. We do
1207 * need to protect the access to p->parent->signal fields, 1207 * need to protect the access to parent->signal fields,
1208 * as other threads in the parent group can be right 1208 * as other threads in the parent group can be right
1209 * here reaping other children at the same time. 1209 * here reaping other children at the same time.
1210 * 1210 *
@@ -1213,8 +1213,8 @@ static int wait_task_zombie(struct task_struct *p, int options,
1213 * group including the group leader. 1213 * group including the group leader.
1214 */ 1214 */
1215 thread_group_cputime(p, &cputime); 1215 thread_group_cputime(p, &cputime);
1216 spin_lock_irq(&p->parent->sighand->siglock); 1216 spin_lock_irq(&p->real_parent->sighand->siglock);
1217 psig = p->parent->signal; 1217 psig = p->real_parent->signal;
1218 sig = p->signal; 1218 sig = p->signal;
1219 psig->cutime = 1219 psig->cutime =
1220 cputime_add(psig->cutime, 1220 cputime_add(psig->cutime,
@@ -1245,7 +1245,7 @@ static int wait_task_zombie(struct task_struct *p, int options,
1245 sig->oublock + sig->coublock; 1245 sig->oublock + sig->coublock;
1246 task_io_accounting_add(&psig->ioac, &p->ioac); 1246 task_io_accounting_add(&psig->ioac, &p->ioac);
1247 task_io_accounting_add(&psig->ioac, &sig->ioac); 1247 task_io_accounting_add(&psig->ioac, &sig->ioac);
1248 spin_unlock_irq(&p->parent->sighand->siglock); 1248 spin_unlock_irq(&p->real_parent->sighand->siglock);
1249 } 1249 }
1250 1250
1251 /* 1251 /*