]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Fix recently introduced problem with shutting down a busy NFS server.
authorNeilBrown <neilb@suse.de>
Tue, 6 Mar 2007 06:11:33 +0000 (17:11 +1100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Mar 2007 18:50:21 +0000 (10:50 -0800)
commitc5f165355bdf4b813f164a64ca09f7d92ba6b20b
tree423570cd4acfd10a188d39887759018fccb00395
parent97f35487312eb92de7f3dc5f44779b6a2bb84e67
Fix recently introduced problem with shutting down a busy NFS server.

When the last thread of nfsd exits, it shuts down all related sockets.
It currently uses svc_close_socket to do this, but that only is
immediately effective if the socket is not SK_BUSY.

If the socket is busy - i.e. if a request has arrived that has not yet
been processes - svc_close_socket is not effective and the shutdown
process spins.

So create a new svc_force_close_socket which removes the SK_BUSY flag
is set and then calls svc_close_socket.

Also change some open-codes loops in svc_destroy to use
list_for_each_entry_safe.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/sunrpc/svcsock.h
net/sunrpc/svc.c
net/sunrpc/svcsock.c