]> Pileus Git - ~andy/linux/blobdiff - net/sunrpc/xprt.c
Merge branch 'kmemleak' of git://linux-arm.org/linux-2.6
[~andy/linux] / net / sunrpc / xprt.c
index fd46d42afa89ed89e6fe2813822f7570e6683160..469de292c23c34b8ba9a0f9ea24e07d4b77d5e09 100644 (file)
@@ -700,6 +700,10 @@ void xprt_connect(struct rpc_task *task)
        }
        if (!xprt_lock_write(xprt, task))
                return;
+
+       if (test_and_clear_bit(XPRT_CLOSE_WAIT, &xprt->state))
+               xprt->ops->close(xprt);
+
        if (xprt_connected(xprt))
                xprt_release_write(xprt, task);
        else {