nfsd: Remove nfs4_lock_state(): nfs4_preprocess_stateid_op()
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 30 Jul 2014 12:27:25 +0000 (08:27 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 5 Aug 2014 14:55:11 +0000 (10:55 -0400)
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 90aa953420b626ef7a8d4dc6039e2952b38b732d..3199ab50d63c42ff709cf1d1be10bff22492c468 100644 (file)
@@ -4465,13 +4465,11 @@ nfs4_preprocess_stateid_op(struct net *net, struct nfsd4_compound_state *cstate,
        if (ZERO_STATEID(stateid) || ONE_STATEID(stateid))
                return check_special_stateids(net, current_fh, stateid, flags);
 
-       nfs4_lock_state();
-
        status = nfsd4_lookup_stateid(cstate, stateid,
                                NFS4_DELEG_STID|NFS4_OPEN_STID|NFS4_LOCK_STID,
                                &s, nn);
        if (status)
-               goto unlock_state;
+               return status;
        status = check_stateid_generation(stateid, &s->sc_stateid, nfsd4_has_session(cstate));
        if (status)
                goto out;
@@ -4521,8 +4519,6 @@ nfs4_preprocess_stateid_op(struct net *net, struct nfsd4_compound_state *cstate,
                *filpp = file;
 out:
        nfs4_put_stid(s);
-unlock_state:
-       nfs4_unlock_state();
        return status;
 }