aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2014-06-30 11:48:45 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-07-09 20:55:05 -0400
commit13d6f66b0826029051518a71d513dbb1a1146992 (patch)
tree825c1df1d17ce999b29a9b555a1b0e9253c4da14 /fs/nfsd/nfs4state.c
parent4b24ca7d30430882a2eaeb9d511990fb4581230d (diff)
nfsd: Convert nfsd4_process_open1() to work with lookup_clientid()
...and have alloc_init_open_stateowner just use the cstate->clp pointer instead of passing in a clp separately. This allows us to use the cached nfs4_client pointer in the cstate instead of having to look it up again. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Jeff Layton <jlayton@primarydata.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index c01d81e21602..342881985eb7 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -2768,10 +2768,10 @@ static void hash_openowner(struct nfs4_openowner *oo, struct nfs4_client *clp, u
2768} 2768}
2769 2769
2770static struct nfs4_openowner * 2770static struct nfs4_openowner *
2771alloc_init_open_stateowner(unsigned int strhashval, struct nfs4_client *clp, 2771alloc_init_open_stateowner(unsigned int strhashval, struct nfsd4_open *open,
2772 struct nfsd4_open *open,
2773 struct nfsd4_compound_state *cstate) 2772 struct nfsd4_compound_state *cstate)
2774{ 2773{
2774 struct nfs4_client *clp = cstate->clp;
2775 struct nfs4_openowner *oo; 2775 struct nfs4_openowner *oo;
2776 2776
2777 oo = alloc_stateowner(openowner_slab, &open->op_owner, clp); 2777 oo = alloc_stateowner(openowner_slab, &open->op_owner, clp);
@@ -3054,10 +3054,10 @@ nfsd4_process_open1(struct nfsd4_compound_state *cstate,
3054 oo = find_openstateowner_str(strhashval, open, cstate->minorversion, nn); 3054 oo = find_openstateowner_str(strhashval, open, cstate->minorversion, nn);
3055 open->op_openowner = oo; 3055 open->op_openowner = oo;
3056 if (!oo) { 3056 if (!oo) {
3057 clp = find_confirmed_client(clientid, cstate->minorversion, 3057 status = lookup_clientid(clientid, cstate, nn);
3058 nn); 3058 if (status)
3059 if (clp == NULL) 3059 return status;
3060 return nfserr_expired; 3060 clp = cstate->clp;
3061 goto new_owner; 3061 goto new_owner;
3062 } 3062 }
3063 if (!(oo->oo_flags & NFS4_OO_CONFIRMED)) { 3063 if (!(oo->oo_flags & NFS4_OO_CONFIRMED)) {
@@ -3073,7 +3073,7 @@ nfsd4_process_open1(struct nfsd4_compound_state *cstate,
3073 clp = oo->oo_owner.so_client; 3073 clp = oo->oo_owner.so_client;
3074 goto alloc_stateid; 3074 goto alloc_stateid;
3075new_owner: 3075new_owner:
3076 oo = alloc_init_open_stateowner(strhashval, clp, open, cstate); 3076 oo = alloc_init_open_stateowner(strhashval, open, cstate);
3077 if (oo == NULL) 3077 if (oo == NULL)
3078 return nfserr_jukebox; 3078 return nfserr_jukebox;
3079 open->op_openowner = oo; 3079 open->op_openowner = oo;