Revert "cpuacct: reduce one NULL check in fast-path"
[linux-2.6.git] / kernel / sched.c
index 2246591f3711f3717a2228b64995bebf1b81d38a..f4c413bdd38d790e10957e970edc02657c245670 100644 (file)
@@ -10001,11 +10001,10 @@ static void cpuacct_charge(struct task_struct *tsk, u64 cputime)
        cpu = task_cpu(tsk);
        ca = task_ca(tsk);
 
-       do {
+       for (; ca; ca = ca->parent) {
                u64 *cpuusage = per_cpu_ptr(ca->cpuusage, cpu);
                *cpuusage += cputime;
-               ca = ca->parent;
-       } while (ca);
+       }
 }
 
 struct cgroup_subsys cpuacct_subsys = {