]> Pileus Git - ~andy/linux/blobdiff - kernel/sched/rt.c
sched/rt: Add reschedule check to switched_from_rt()
[~andy/linux] / kernel / sched / rt.c
index 418feb01344edb7e59f11643e153e2f1866cc4ed..29bda5bdf2a57d14e0f2ca71830569cdd5313bfa 100644 (file)
@@ -1889,8 +1889,11 @@ static void switched_from_rt(struct rq *rq, struct task_struct *p)
         * we may need to handle the pulling of RT tasks
         * now.
         */
-       if (p->on_rq && !rq->rt.rt_nr_running)
-               pull_rt_task(rq);
+       if (!p->on_rq || rq->rt.rt_nr_running)
+               return;
+
+       if (pull_rt_task(rq))
+               resched_task(rq->curr);
 }
 
 void init_sched_rt_class(void)