Skip to content

Commit

Permalink
svcrpc: svc_close_xprt comment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
J. Bruce Fields committed Nov 19, 2010
1 parent f8c0d22 commit b176331
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion net/sunrpc/svc_xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b176331

Please sign in to comment.