From 22770def36bdd490316203fd08ae67b41d26b3cc Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 19 Jan 2004 05:13:52 -0800 Subject: [PATCH] [PATCH] setscheduler fix From: Joe Korty task_running(rq,p) is equivalent to (rq->curr == p) only for some architectures. --- kernel/sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched.c b/kernel/sched.c index 0da8927c227c2..d233ad6a44fe0 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -2184,7 +2184,7 @@ static int setscheduler(pid_t pid, int policy, struct sched_param __user *param) * our priority decreased, or if we are not currently running on * this runqueue and our priority is higher than the current's */ - if (rq->curr == p) { + if (task_running(rq, p)) { if (p->prio > oldprio) resched_task(rq->curr); } else if (p->prio < rq->curr->prio) -- 2.53.0