Index: linux-2.6.10-ck2/include/linux/ioprio.h
===================================================================
--- linux-2.6.10-ck2.orig/include/linux/ioprio.h	2005-01-04 09:32:47.705659200 +1100
+++ linux-2.6.10-ck2/include/linux/ioprio.h	2005-01-04 09:48:02.373608536 +1100
@@ -33,9 +33,15 @@
  */
 static inline int task_ioprio(struct task_struct *task)
 {
-	if (!task->ioprio)
-		return (task_nice(task) + 20) / 5;
-	else
+	if (!task->ioprio) {
+		int effective_nice = task_nice(task);
+
+		if (batch_task(task))
+			effective_nice = 20;
+		else if (iso_task(task))
+			effective_nice = -20;
+		return (effective_nice + 20) / 5;
+	} else
 		return IOPRIO_PRIO_DATA(task->ioprio);
 }
 

