From: Kinglong Mee Date: Mon, 24 Mar 2014 04:00:28 +0000 (+0800) Subject: SUNRPC: Clear xpt_bc_xprt if xs_setup_bc_tcp failed X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=642aab58db209da990dc11b966933afc622ac4c5;p=linux-beck.git SUNRPC: Clear xpt_bc_xprt if xs_setup_bc_tcp failed 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 Signed-off-by: J. Bruce Fields --- diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 1335239217cd..3e251b81d26a 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -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: