diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-11-29 17:35:35 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-12-06 22:18:52 +0100 |
commit | 2fefb8a09e7ed251ae8996e0c69066e74c5aa560 (patch) | |
tree | 6d353a2051063f63f4667d9e2d54ec30dec91049 /net/sunrpc/svc_xprt.c | |
parent | svcrpc: make svc_delete_xprt static (diff) | |
download | linux-2fefb8a09e7ed251ae8996e0c69066e74c5aa560.tar.xz linux-2fefb8a09e7ed251ae8996e0c69066e74c5aa560.zip |
svcrpc: destroy server sockets all at once
There's no reason I can see that we need to call sv_shutdown between
closing the two lists of sockets.
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 8046c6d1f9c2..099ddf99d2a1 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c @@ -929,7 +929,7 @@ void svc_close_xprt(struct svc_xprt *xprt) } EXPORT_SYMBOL_GPL(svc_close_xprt); -void svc_close_all(struct list_head *xprt_list) +static void svc_close_list(struct list_head *xprt_list) { struct svc_xprt *xprt; struct svc_xprt *tmp; @@ -947,6 +947,15 @@ void svc_close_all(struct list_head *xprt_list) } } +void svc_close_all(struct svc_serv *serv) +{ + svc_close_list(&serv->sv_tempsocks); + svc_close_list(&serv->sv_permsocks); + BUG_ON(!list_empty(&serv->sv_permsocks)); + BUG_ON(!list_empty(&serv->sv_tempsocks)); + +} + /* * Handle defer and revisit of requests */ |