Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[safe/jmp/linux-2.6] / kernel / sched.c
index 63e0971..6c10fa7 100644 (file)
@@ -61,6 +61,7 @@
 #include <linux/delayacct.h>
 #include <linux/reciprocal_div.h>
 #include <linux/unistd.h>
+#include <linux/pagemap.h>
 
 #include <asm/tlb.h>
 
@@ -1682,6 +1683,11 @@ void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
 
        p->prio = effective_prio(p);
 
+       if (rt_prio(p->prio))
+               p->sched_class = &rt_sched_class;
+       else
+               p->sched_class = &fair_sched_class;
+
        if (!p->sched_class->task_new || !sysctl_sched_child_runs_first ||
                        (clone_flags & CLONE_VM) || task_cpu(p) != this_cpu ||
                        !current->se.on_rq) {