SUNRPC: Clear xpt_bc_xprt if xs_setup_bc_tcp failed
authorKinglong Mee <kinglongmee@gmail.com>
Mon, 24 Mar 2014 04:00:28 +0000 (12:00 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Sun, 30 Mar 2014 14:47:37 +0000 (10:47 -0400)
Don't move the assign of args->bc_xprt->xpt_bc_xprt out of xs_setup_bc_tcp,
because rpc_ping (which is in rpc_create) will using it.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xprtsock.c

index 1335239..3e251b8 100644 (file)
@@ -2982,6 +2982,8 @@ static struct rpc_xprt *xs_setup_bc_tcp(struct xprt_create *args)
 
        if (try_module_get(THIS_MODULE))
                return xprt;
+
+       args->bc_xprt->xpt_bc_xprt = NULL;
        xprt_put(xprt);
        ret = ERR_PTR(-EINVAL);
 out_err: