From d4398e174e7b196a07d3ca2b6fecbc3c60cc1cc7 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Mon, 17 Nov 2008 15:40:01 +0100 Subject: [PATCH] --- yaml --- r: 123183 b: refs/heads/master c: ce394471d13bf071939a9a0b48c64c297676d233 h: refs/heads/master i: 123181: c0d85e10930158997da0337803d3be19d0beca22 123179: 876e55c22b8e558db0b85fa240dffe0c0c3cd29d 123175: b8f0d83b5f96d15c851fd359a3fb6c40e9a12af5 123167: 61c7d284d04be83a26e9d7b782ddd6959ee3800c v: v3 --- [refs] | 2 +- trunk/kernel/posix-cpu-timers.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 9981e21bf02a..afbfb59a3801 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 74fcd524e808975dd546dac847119f1995a7c622 +refs/heads/master: ce394471d13bf071939a9a0b48c64c297676d233 diff --git a/trunk/kernel/posix-cpu-timers.c b/trunk/kernel/posix-cpu-timers.c index 895337b16a24..3f4377e0aa04 100644 --- a/trunk/kernel/posix-cpu-timers.c +++ b/trunk/kernel/posix-cpu-timers.c @@ -58,21 +58,21 @@ void thread_group_cputime( struct task_struct *tsk, struct task_cputime *times) { - struct signal_struct *sig; + struct task_cputime *totals, *tot; int i; - struct task_cputime *tot; - sig = tsk->signal; - if (unlikely(!sig) || !sig->cputime.totals) { + totals = tsk->signal->cputime.totals; + if (!totals) { times->utime = tsk->utime; times->stime = tsk->stime; times->sum_exec_runtime = tsk->se.sum_exec_runtime; return; } + times->stime = times->utime = cputime_zero; times->sum_exec_runtime = 0; for_each_possible_cpu(i) { - tot = per_cpu_ptr(tsk->signal->cputime.totals, i); + tot = per_cpu_ptr(totals, i); times->utime = cputime_add(times->utime, tot->utime); times->stime = cputime_add(times->stime, tot->stime); times->sum_exec_runtime += tot->sum_exec_runtime;