2.4.18: nfs_create_request wiping current->policy

Arnar Mar Hrafnkelsson (addi@umich.edu)
Fri, 19 Apr 2002 01:36:58 -0400 (EDT)


This post applies to vanilla 2.4.18.

It looks to me like nfs_create_request() is assigning to policy
instead of or'ing the yield bit effectively converting real time
tasks (SCHED_FIFO=2 and SCHED_RR=1) into normal tasks (SCHED_OTHER=0).

If I'm overlooking something trivial just hit me with the cluebat,
otherwise trivial patch follows.

diff -r -u linux-2.4.18/fs/nfs/pagelist.c linux-fixed/fs/nfs/pagelist.c
--- linux-2.4.18/fs/nfs/pagelist.c Fri Dec 21 12:41:55 2001
+++ linux-fixed/fs/nfs/pagelist.c Fri Apr 19 01:10:02 2002
@@ -96,7 +96,7 @@
continue;
if (signalled() && (server->flags & NFS_MOUNT_INTR))
return ERR_PTR(-ERESTARTSYS);
- current->policy = SCHED_YIELD;
+ current->policy |= SCHED_YIELD;
schedule();
}

I'm not subscribed to lkml, please cc.
-- Thanks, Arnar.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/