Index: linux-2.6.9-rc2-mm2/kernel/sched.c
===================================================================
--- linux-2.6.9-rc2-mm2.orig/kernel/sched.c	2004-09-23 20:55:17.894751086 +1000
+++ linux-2.6.9-rc2-mm2/kernel/sched.c	2004-09-23 21:03:57.042982410 +1000
@@ -2030,14 +2030,14 @@ static void time_slice_expiry_fn(unsigne
 	struct timer_list *rt = &__get_cpu_var(time_slice_expiry);
 	runqueue_t *rq;
 	task_t *p = current;
+	unsigned long flags;
 
 	/* CPU hotplug can drag us off cpu: don't run on wrong CPU */
 	if (cpu_is_offline(cpu)) {
 		del_timer(rt);
 		return;
 	}
-	rq = this_rq();
-	spin_lock(&rq->lock);
+	rq = task_rq_lock(p, &flags);
 	if (unlikely(rq->task_expires > jiffies || !rq->task_expires))
 		/*
 		 * May have changed before we got the rq lock
@@ -2048,7 +2048,7 @@ static void time_slice_expiry_fn(unsigne
 	else
 		time_slice_expired(p, rq);
 out_unlock:
-	spin_unlock(&rq->lock);
+	task_rq_unlock(rq, &flags);
 }
   
 static void set_expiry_timer
