diff options
author | NeilBrown <neilb@suse.de> | 2007-03-06 04:42:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-06 12:30:26 -0500 |
commit | cda1fd4abd773216a888487af0170d0cc3d50454 (patch) | |
tree | aed6662bab1789a1698644f2e1d0db4255ecad67 /include/linux/sunrpc/svcsock.h | |
parent | 5a05ed73e1abfd7e0e7d474817245861deaa18af (diff) |
[PATCH] knfsd: 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sunrpc/svcsock.h')
-rw-r--r-- | include/linux/sunrpc/svcsock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index cccea0a0feb4..7909687557bf 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -66,7 +66,7 @@ struct svc_sock { | |||
66 | * Function prototypes. | 66 | * Function prototypes. |
67 | */ | 67 | */ |
68 | int svc_makesock(struct svc_serv *, int, unsigned short, int flags); | 68 | int svc_makesock(struct svc_serv *, int, unsigned short, int flags); |
69 | void svc_close_socket(struct svc_sock *); | 69 | void svc_force_close_socket(struct svc_sock *); |
70 | int svc_recv(struct svc_rqst *, long); | 70 | int svc_recv(struct svc_rqst *, long); |
71 | int svc_send(struct svc_rqst *); | 71 | int svc_send(struct svc_rqst *); |
72 | void svc_drop(struct svc_rqst *); | 72 | void svc_drop(struct svc_rqst *); |