sched/cputime: Refactor the cputime_adjust() code
[linux-2.6-block.git] / kernel / sched / cputime.c
index aea3135c5d90f434ee72980c30f0db1129ef752b..67c70e287647b10446eddb427250a479667595d5 100644 (file)
@@ -615,19 +615,13 @@ static void cputime_adjust(struct task_cputime *curr,
         * userspace. Once a task gets some ticks, the monotonicy code at
         * 'update' will ensure things converge to the observed ratio.
         */
-       if (stime == 0) {
-               utime = rtime;
-               goto update;
+       if (stime != 0) {
+               if (utime == 0)
+                       stime = rtime;
+               else
+                       stime = scale_stime(stime, rtime, stime + utime);
        }
 
-       if (utime == 0) {
-               stime = rtime;
-               goto update;
-       }
-
-       stime = scale_stime(stime, rtime, stime + utime);
-
-update:
        /*
         * Make sure stime doesn't go backwards; this preserves monotonicity
         * for utime because rtime is monotonic.