diff options
author | J. Bruce Fields <bfields@redhat.com> | 2016-05-16 17:03:42 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2016-06-15 10:32:25 -0400 |
commit | d50039ea5ee63c589b0434baa5ecf6e5075bb6f9 (patch) | |
tree | 3f93ee65837cdd026d59c7b97ab5156a8aa08745 /fs | |
parent | 1208fd569c07ab84aa5d024abd863267c2953b4a (diff) |
nfsd4/rpc: move backchannel create logic into rpc code
Also simplify the logic a bit.
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Acked-by: Trond Myklebust <trondmy@primarydata.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 7389cb1d7409..04c68d900324 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -710,22 +710,6 @@ static struct rpc_cred *get_backchannel_cred(struct nfs4_client *clp, struct rpc | |||
710 | } | 710 | } |
711 | } | 711 | } |
712 | 712 | ||
713 | static struct rpc_clnt *create_backchannel_client(struct rpc_create_args *args) | ||
714 | { | ||
715 | struct rpc_xprt *xprt; | ||
716 | |||
717 | if (args->protocol != XPRT_TRANSPORT_BC_TCP) | ||
718 | return rpc_create(args); | ||
719 | |||
720 | xprt = args->bc_xprt->xpt_bc_xprt; | ||
721 | if (xprt) { | ||
722 | xprt_get(xprt); | ||
723 | return rpc_create_xprt(args, xprt); | ||
724 | } | ||
725 | |||
726 | return rpc_create(args); | ||
727 | } | ||
728 | |||
729 | static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_session *ses) | 713 | static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *conn, struct nfsd4_session *ses) |
730 | { | 714 | { |
731 | int maxtime = max_cb_time(clp->net); | 715 | int maxtime = max_cb_time(clp->net); |
@@ -768,7 +752,7 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c | |||
768 | args.authflavor = ses->se_cb_sec.flavor; | 752 | args.authflavor = ses->se_cb_sec.flavor; |
769 | } | 753 | } |
770 | /* Create RPC client */ | 754 | /* Create RPC client */ |
771 | client = create_backchannel_client(&args); | 755 | client = rpc_create(&args); |
772 | if (IS_ERR(client)) { | 756 | if (IS_ERR(client)) { |
773 | dprintk("NFSD: couldn't create callback client: %ld\n", | 757 | dprintk("NFSD: couldn't create callback client: %ld\n", |
774 | PTR_ERR(client)); | 758 | PTR_ERR(client)); |