From: Joe Korty <joe.korty@ccur.com>

task_running(rq,p) is equivalent to (rq->curr == p) only for some
architectures.



---

 25-akpm/kernel/sched.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN kernel/sched.c~set_scheduler-fix kernel/sched.c
--- 25/kernel/sched.c~set_scheduler-fix	Tue Jan 13 16:01:08 2004
+++ 25-akpm/kernel/sched.c	Tue Jan 13 16:01:08 2004
@@ -2500,7 +2500,7 @@ static int setscheduler(pid_t pid, int p
 		 * 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)

_