sched: Use task_rq_unlock() in __sched_setscheduler()

It seems there's no specific reason to open-code it.  I guess
commit 0122ec5b02 ("sched: Add p->pi_lock to task_rq_lock()")
simply missed it.  Let's be consistent with others.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1341647342-6742-1-git-send-email-namhyung@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Namhyung Kim 2012-07-07 16:49:02 +09:00 committed by Ingo Molnar
parent 6956dc568f
commit 45afb1734f
1 changed files with 1 additions and 3 deletions

View File

@ -4340,9 +4340,7 @@ static int __sched_setscheduler(struct task_struct *p, int policy,
*/
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;
}