]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sched_rt: don't start timer when rt bandwidth disabled
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Wed, 25 Feb 2009 17:59:26 +0000 (09:59 -0800)
committerIngo Molnar <mingo@elte.hu>
Thu, 26 Feb 2009 13:18:55 +0000 (14:18 +0100)
Impact: fix incorrect condition check

No need to start rt bandwidth timer when rt bandwidth is disabled.
If this timer starts, it may stop at sched_rt_period_timer() on the first time.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched.c

index 410eec404133fd267eb80041395e21d266f0e552..c3baa9653d1dbf20f8539afcad9702ab2414a13b 100644 (file)
@@ -223,7 +223,7 @@ static void start_rt_bandwidth(struct rt_bandwidth *rt_b)
 {
        ktime_t now;
 
-       if (rt_bandwidth_enabled() && rt_b->rt_runtime == RUNTIME_INF)
+       if (!rt_bandwidth_enabled() || rt_b->rt_runtime == RUNTIME_INF)
                return;
 
        if (hrtimer_active(&rt_b->rt_period_timer))