]> git.karo-electronics.de Git - linux-beck.git/commitdiff
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 1335239217cd29a8041aa56e9711be5b9a13b582..3e251b81d26aeed03d293dc67865e091f6e93174 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: