]> err.no Git - linux-2.6/blobdiff - fs/nfsd/nfs4proc.c
[PATCH] knfsd: fix nfs4_open lock leak
[linux-2.6] / fs / nfsd / nfs4proc.c
index a00fe86862935a5c053505baca0fd6d1cdbdad09..6d63f1d9e5f598bdf15f9f44173083622a53eea5 100644 (file)
@@ -195,10 +195,12 @@ nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open
 
        /* Openowner is now set, so sequence id will get bumped.  Now we need
         * these checks before we do any creates: */
+       status = nfserr_grace;
        if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS)
-               return nfserr_grace;
+               goto out;
+       status = nfserr_no_grace;
        if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
-               return nfserr_no_grace;
+               goto out;
 
        switch (open->op_claim_type) {
                case NFS4_OPEN_CLAIM_DELEGATE_CUR: