svcrpc: never clear XPT_BUSY on dead xprt
authorJ. Bruce Fields <bfields@redhat.com>
Sat, 23 Oct 2010 15:04:12 +0000 (11:04 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 25 Oct 2010 21:58:40 +0000 (17:58 -0400)
Once an xprt has been deleted, there's no reason to allow it to be
enqueued--at worst, that might cause the xprt to be re-added to some
global list, resulting in later corruption.

Also, note this leaves us with no need for the reference-count
manipulation here.

Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/svc_xprt.c

index bef1e8844a2c028673fdd2594b681fd757461626..1b0673c6e98630cbfd6b372225772da97ebaee22 100644 (file)
@@ -936,10 +936,7 @@ void svc_close_xprt(struct svc_xprt *xprt)
                /* someone else will have to effect the close */
                return;
 
-       svc_xprt_get(xprt);
        svc_delete_xprt(xprt);
-       clear_bit(XPT_BUSY, &xprt->xpt_flags);
-       svc_xprt_put(xprt);
 }
 EXPORT_SYMBOL_GPL(svc_close_xprt);