Commit 45afb173 authored by Namhyung Kim's avatar Namhyung Kim Committed by Ingo Molnar

sched: Use task_rq_unlock() in __sched_setscheduler()

It seems there's no specific reason to open-code it.  I guess
commit 0122ec5b ("sched: Add p->pi_lock to task_rq_lock()")
simply missed it.  Let's be consistent with others.
Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1341647342-6742-1-git-send-email-namhyung@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 6956dc56
...@@ -4340,9 +4340,7 @@ static int __sched_setscheduler(struct task_struct *p, int policy, ...@@ -4340,9 +4340,7 @@ static int __sched_setscheduler(struct task_struct *p, int policy,
*/ */
if (unlikely(policy == p->policy && (!rt_policy(policy) || if (unlikely(policy == p->policy && (!rt_policy(policy) ||
param->sched_priority == p->rt_priority))) { param->sched_priority == p->rt_priority))) {
task_rq_unlock(rq, p, &flags);
__task_rq_unlock(rq);
raw_spin_unlock_irqrestore(&p->pi_lock, flags);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment