Commit e7d5dc19 authored by Trond Myklebust's avatar Trond Myklebust Committed by J. Bruce Fields

nfsd: Remove nfs4_lock_state(): nfsd4_test_stateid/nfsd4_free_stateid

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent c2d1d6a8
...@@ -4532,11 +4532,9 @@ nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -4532,11 +4532,9 @@ nfsd4_test_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct nfsd4_test_stateid_id *stateid; struct nfsd4_test_stateid_id *stateid;
struct nfs4_client *cl = cstate->session->se_client; struct nfs4_client *cl = cstate->session->se_client;
nfs4_lock_state();
list_for_each_entry(stateid, &test_stateid->ts_stateid_list, ts_id_list) list_for_each_entry(stateid, &test_stateid->ts_stateid_list, ts_id_list)
stateid->ts_id_status = stateid->ts_id_status =
nfsd4_validate_stateid(cl, &stateid->ts_id_stateid); nfsd4_validate_stateid(cl, &stateid->ts_id_stateid);
nfs4_unlock_state();
return nfs_ok; return nfs_ok;
} }
...@@ -4552,7 +4550,6 @@ nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -4552,7 +4550,6 @@ nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct nfs4_client *cl = cstate->session->se_client; struct nfs4_client *cl = cstate->session->se_client;
__be32 ret = nfserr_bad_stateid; __be32 ret = nfserr_bad_stateid;
nfs4_lock_state();
spin_lock(&cl->cl_lock); spin_lock(&cl->cl_lock);
s = find_stateid_locked(cl, stateid); s = find_stateid_locked(cl, stateid);
if (!s) if (!s)
...@@ -4593,7 +4590,6 @@ nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -4593,7 +4590,6 @@ nfsd4_free_stateid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
out_unlock: out_unlock:
spin_unlock(&cl->cl_lock); spin_unlock(&cl->cl_lock);
out: out:
nfs4_unlock_state();
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment