]> err.no Git - linux-2.6/commitdiff
sched: fix cpuprio build bug
authorIngo Molnar <mingo@elte.hu>
Thu, 5 Jun 2008 10:25:37 +0000 (12:25 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 6 Jun 2008 13:19:46 +0000 (15:19 +0200)
this patch was not built on !SMP:

 kernel/sched_rt.c: In function 'inc_rt_tasks':
 kernel/sched_rt.c:404: error: 'struct rq' has no member named 'online'

Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_rt.c

index e4821593d4de9e3c7bce137c64b00e85e9ef762e..eaa606071d51c44f71a0c2d265c78566739f2c1f 100644 (file)
@@ -399,16 +399,19 @@ void inc_rt_tasks(struct sched_rt_entity *rt_se, struct rt_rq *rt_rq)
 #if defined CONFIG_SMP || defined CONFIG_RT_GROUP_SCHED
        if (rt_se_prio(rt_se) < rt_rq->highest_prio) {
                struct rq *rq = rq_of_rt_rq(rt_rq);
-               rt_rq->highest_prio = rt_se_prio(rt_se);
 
+               rt_rq->highest_prio = rt_se_prio(rt_se);
+#ifdef CONFIG_SMP
                if (rq->online)
                        cpupri_set(&rq->rd->cpupri, rq->cpu,
                                   rt_se_prio(rt_se));
+#endif
        }
 #endif
 #ifdef CONFIG_SMP
        if (rt_se->nr_cpus_allowed > 1) {
                struct rq *rq = rq_of_rt_rq(rt_rq);
+
                rq->rt.rt_nr_migratory++;
        }