Skip to content

Commit

Permalink
sched: Use task_rq_unlock() in __sched_setscheduler()
Browse files Browse the repository at this point in the history
It seems there's no specific reason to open-code it.  I guess
commit 0122ec5 ("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>
  • Loading branch information
Namhyung Kim authored and Ingo Molnar committed Jul 26, 2012
1 parent 6956dc5 commit 45afb17
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 45afb17

Please sign in to comment.