Skip to content

Commit

Permalink
SUNRPC: Clear xpt_bc_xprt if xs_setup_bc_tcp failed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kinglong Mee authored and J. Bruce Fields committed Mar 30, 2014
1 parent d531c00 commit 642aab5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 642aab5

Please sign in to comment.