]> err.no Git - linux-2.6/blobdiff - kernel/sched_rt.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6] / kernel / sched_rt.c
index 837241568d767a2f0b25298544921088bfba4941..0f3c19197fa4e0ca4c614916efc818554db5afef 100644 (file)
@@ -250,7 +250,8 @@ static int do_sched_rt_period_timer(struct rt_bandwidth *rt_b, int overrun)
                        if (rt_rq->rt_time || rt_rq->rt_nr_running)
                                idle = 0;
                        spin_unlock(&rt_rq->rt_runtime_lock);
-               }
+               } else if (rt_rq->rt_nr_running)
+                       idle = 0;
 
                if (enqueue)
                        sched_rt_rq_enqueue(rt_rq);
@@ -549,8 +550,10 @@ static
 void requeue_rt_entity(struct rt_rq *rt_rq, struct sched_rt_entity *rt_se)
 {
        struct rt_prio_array *array = &rt_rq->active;
+       struct list_head *queue = array->queue + rt_se_prio(rt_se);
 
-       list_move_tail(&rt_se->run_list, array->queue + rt_se_prio(rt_se));
+       if (on_rt_rq(rt_se))
+               list_move_tail(&rt_se->run_list, queue);
 }
 
 static void requeue_task_rt(struct rq *rq, struct task_struct *p)