]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
svcrpc: svc_close_xprt comment
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 26 Oct 2010 00:24:48 +0000 (20:24 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 19 Nov 2010 23:35:12 +0000 (18:35 -0500)
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>
net/sunrpc/svc_xprt.c

index 8c018df80692f9113f063e6f046bbbdeb5fba505..bfbda676574ab575fcca7deabdb0e0a209441718 100644 (file)
@@ -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);