diff options
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index 826e1dc8168b..94a9992e6fd9 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -1191,7 +1191,6 @@ static int wait_task_zombie(struct task_struct *p, int options, | |||
1191 | if (likely(!traced)) { | 1191 | if (likely(!traced)) { |
1192 | struct signal_struct *psig; | 1192 | struct signal_struct *psig; |
1193 | struct signal_struct *sig; | 1193 | struct signal_struct *sig; |
1194 | struct task_cputime cputime; | ||
1195 | 1194 | ||
1196 | /* | 1195 | /* |
1197 | * The resource counters for the group leader are in its | 1196 | * The resource counters for the group leader are in its |
@@ -1207,23 +1206,20 @@ static int wait_task_zombie(struct task_struct *p, int options, | |||
1207 | * need to protect the access to parent->signal fields, | 1206 | * need to protect the access to parent->signal fields, |
1208 | * as other threads in the parent group can be right | 1207 | * as other threads in the parent group can be right |
1209 | * here reaping other children at the same time. | 1208 | * here reaping other children at the same time. |
1210 | * | ||
1211 | * We use thread_group_cputime() to get times for the thread | ||
1212 | * group, which consolidates times for all threads in the | ||
1213 | * group including the group leader. | ||
1214 | */ | 1209 | */ |
1215 | thread_group_cputime(p, &cputime); | ||
1216 | spin_lock_irq(&p->real_parent->sighand->siglock); | 1210 | spin_lock_irq(&p->real_parent->sighand->siglock); |
1217 | psig = p->real_parent->signal; | 1211 | psig = p->real_parent->signal; |
1218 | sig = p->signal; | 1212 | sig = p->signal; |
1219 | psig->cutime = | 1213 | psig->cutime = |
1220 | cputime_add(psig->cutime, | 1214 | cputime_add(psig->cutime, |
1221 | cputime_add(cputime.utime, | 1215 | cputime_add(p->utime, |
1222 | sig->cutime)); | 1216 | cputime_add(sig->utime, |
1217 | sig->cutime))); | ||
1223 | psig->cstime = | 1218 | psig->cstime = |
1224 | cputime_add(psig->cstime, | 1219 | cputime_add(psig->cstime, |
1225 | cputime_add(cputime.stime, | 1220 | cputime_add(p->stime, |
1226 | sig->cstime)); | 1221 | cputime_add(sig->stime, |
1222 | sig->cstime))); | ||
1227 | psig->cgtime = | 1223 | psig->cgtime = |
1228 | cputime_add(psig->cgtime, | 1224 | cputime_add(psig->cgtime, |
1229 | cputime_add(p->gtime, | 1225 | cputime_add(p->gtime, |