[PATCH] Keep nfsd from exiting when seeing recv() errors
authorOlaf Kirch <okir@suse.de>
Fri, 6 Jan 2006 08:19:56 +0000 (00:19 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:33:59 +0000 (08:33 -0800)
commit93fbf1a5de8afde08988dda3735669099dee84d0
tree2be514a800662b94a6a879b7b53f5fab6b56dd0e
parentf93ea411b73594f7d144855fd34278bcf34a9afc
[PATCH] Keep nfsd from exiting when seeing recv() errors

I submitted this one previously - svc_tcp_recvfrom currently returns
any errors to the caller, including ECONNRESET and the like.

This is something svc_recv isn't able to deal with:

len = svsk->sk_recvfrom(rqstp);
[...]
if (len == 0 || len == -EAGAIN) {
[...]
return -EAGAIN;
}

[...]
return len;

The nfsd main loop will exit when it sees an error code other than
EAGAIN.

The following patch fixes this problem

svc_recv is not equipped to deal with error codes other than EAGAIN,
and will propagate anything else (such as ECONNRESET) up to nfsd,
causing it to exit.

Signed-off-by: Olaf Kirch <okir@suse.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
net/sunrpc/svcsock.c