summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2010-10-26 02:24:48 +0200
committerJ. Bruce Fields <bfields@redhat.com>2010-11-20 00:35:12 +0100
commitb176331627fccc726d28f4fc4a357d1f3c19dbf0 (patch)
treef7190ebede63602d21fc7c227a3517b40b35e94d /net/sunrpc
parentsvcrpc: simplify svc_close_all (diff)
downloadlinux-b176331627fccc726d28f4fc4a357d1f3c19dbf0.tar.xz
linux-b176331627fccc726d28f4fc4a357d1f3c19dbf0.zip
svcrpc: svc_close_xprt comment
Neil Brown had to explain to me why we do this here; record the answer for posterity. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/svc_xprt.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 8c018df80692..bfbda676574a 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -931,7 +931,12 @@ void svc_close_xprt(struct svc_xprt *xprt)
if (test_and_set_bit(XPT_BUSY, &xprt->xpt_flags))
/* someone else will have to effect the close */
return;
-
+ /*
+ * We expect svc_close_xprt() to work even when no threads are
+ * running (e.g., while configuring the server before starting
+ * any threads), so if the transport isn't busy, we delete
+ * it ourself:
+ */
svc_delete_xprt(xprt);
}
EXPORT_SYMBOL_GPL(svc_close_xprt);