nfsd: Remove nfs4_lock_state(): nfsd4_release_lockowner
authorTrond Myklebust <trond.myklebust@primarydata.com>
Wed, 30 Jul 2014 12:27:27 +0000 (08:27 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 5 Aug 2014 14:55:12 +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 712d7e75e7dd736cf82ca1f497bb8e51b9fca418..0f9e8426b2dd6faa655b606d166cd5e4115f617a 100644 (file)
@@ -5577,11 +5577,9 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp,
        dprintk("nfsd4_release_lockowner clientid: (%08x/%08x):\n",
                clid->cl_boot, clid->cl_id);
 
-       nfs4_lock_state();
-
        status = lookup_clientid(clid, cstate, nn);
        if (status)
-               goto out;
+               return status;
 
        clp = cstate->clp;
        /* Find the matching lock stateowner */
@@ -5598,7 +5596,7 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp,
                        if (check_for_locks(stp->st_stid.sc_file, lo)) {
                                status = nfserr_locks_held;
                                spin_unlock(&clp->cl_lock);
-                               goto out;
+                               return status;
                        }
                }
 
@@ -5608,8 +5606,6 @@ nfsd4_release_lockowner(struct svc_rqst *rqstp,
        spin_unlock(&clp->cl_lock);
        if (lo)
                release_lockowner(lo);
-out:
-       nfs4_unlock_state();
        return status;
 }