Patch from: Trond Myklebust <trond.myklebust@fys.uio.no>

     > It doesn't work, alas.  _Any_ GFP_KERNEL allocation by rpciod
     > can cause the same problem:

Right, but that should only happen in socket transmission, and can be
fixed by choosing sk->allocation != GFP_KERNEL (in fact, I believe TCP
sockets always do GFP_ATOMIC).

For UDP sockets, GFP_ATOMIC is a bit too strict, since we have to
allocate a complete 32k buffer in one go, but perhaps GFP_NOIO would
be sufficient?

(akpm: nah, GFP_NOFS.  So we can still do swapout)


 sunrpc/xprt.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN net/sunrpc/xprt.c~sk-allocation net/sunrpc/xprt.c
--- 25/net/sunrpc/xprt.c~sk-allocation	2003-02-14 00:29:22.000000000 -0800
+++ 25-akpm/net/sunrpc/xprt.c	2003-02-14 00:29:22.000000000 -0800
@@ -1459,6 +1459,7 @@ xprt_bind_socket(struct rpc_xprt *xprt, 
 	if (xprt->prot == IPPROTO_UDP) {
 		sk->data_ready = udp_data_ready;
 		sk->no_check = UDP_CSUM_NORCV;
+		sk->allocation = GFP_NOFS;
 		xprt_set_connected(xprt);
 	} else {
 		struct tcp_opt *tp = tcp_sk(sk);

_