aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2014-03-24 00:00:28 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-03-30 10:47:37 -0400
commit642aab58db209da990dc11b966933afc622ac4c5 (patch)
treeff442269c9a6865547edf511715e58a53d5402e3
parentd531c008d7d9713456abe3d265fc577bba2e1cef (diff)
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 <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r--net/sunrpc/xprtsock.c2
1 files changed, 2 insertions, 0 deletions
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)
2982 2982
2983 if (try_module_get(THIS_MODULE)) 2983 if (try_module_get(THIS_MODULE))
2984 return xprt; 2984 return xprt;
2985
2986 args->bc_xprt->xpt_bc_xprt = NULL;
2985 xprt_put(xprt); 2987 xprt_put(xprt);
2986 ret = ERR_PTR(-EINVAL); 2988 ret = ERR_PTR(-EINVAL);
2987out_err: 2989out_err: