]> git.ipfire.org Git - people/arne_f/kernel.git/blobdiff - kernel/sched/core.c
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[people/arne_f/kernel.git] / kernel / sched / core.c
index 5d011ef4c0df37ee859ac3d3871fcabd2164316a..82ad284f823b6a60e81b1ebef44bae94ca73db6e 100644 (file)
@@ -1910,12 +1910,12 @@ static inline void
 prepare_task_switch(struct rq *rq, struct task_struct *prev,
                    struct task_struct *next)
 {
+       trace_sched_switch(prev, next);
        sched_info_switch(prev, next);
        perf_event_task_sched_out(prev, next);
        fire_sched_out_preempt_notifiers(prev, next);
        prepare_lock_switch(rq, next);
        prepare_arch_switch(next);
-       trace_sched_switch(prev, next);
 }
 
 /**
@@ -4340,9 +4340,7 @@ recheck:
         */
        if (unlikely(policy == p->policy && (!rt_policy(policy) ||
                        param->sched_priority == p->rt_priority))) {
-
-               __task_rq_unlock(rq);
-               raw_spin_unlock_irqrestore(&p->pi_lock, flags);
+               task_rq_unlock(rq, p, &flags);
                return 0;
        }