sched: Use task_rq_unlock on __sched_setscheduler
PATCH 1/1 sched: Use task_rq_unlock on __sched_setscheduler
From: Namhyung Kim <[email protected]>
It seems there's no specific reason to open-code it. I guess the commit 0122ec5b02f76 ("sched: Add p->pi_lock to task_rq_lock()") simply missed it. Let's be consistent with others.
--- kernel/sched/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
kernel/sched/core.c +1 -3
@@ -4343,9 +4343,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 ; }
Signature · 1 line
1.7.10.4
Peter Zijlstra
maintainerQuoted 5 lines · Namhyung Kim
From: Namhyung Kim <[email protected]>
It seems there's no specific reason to open-code it. I guess the commit
0122ec5b02f76("sched: Addp->pi_locktotask_rq_lock()") simply missed it. Let's be consistent with others.
Looks that way, thanks!
[tip:sched/urgent] sched: Use task_rq_unlock() in __sched_setscheduler()
In reply to Namhyung KimCommit-ID: 45afb1734fa6323a8ba08bd6c392ee227df67dde Gitweb: http://git.kernel.org/tip/45afb1734fa6323a8ba08bd6c392ee227df67dde Author: Namhyung Kim <[email protected]> AuthorDate: Sat, 7 Jul 2012 16:49:02 +0900 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 26 Jul 2012 11:46:59 +0200
sched: Use task_rq_unlock() in __sched_setscheduler()
It seems there's no specific reason to open-code it. I guess commit 0122ec5b02f76 ("sched: Add p->pi_lock to task_rq_lock()") simply missed it. Let's be consistent with others.
--- kernel/sched/core.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
kernel/sched/core.c +1 -3
@@ -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 ; }