[PATCH] nfsd4: don't create on open that fails due to ERR_GRACE
[deliverable/linux.git] / fs / nfsd / nfs4proc.c
index 89028f2d8d26aa9e463ba787384c1b5bd39937b9..b3f169f400db50192479b43b75d15c68c367f634 100644 (file)
@@ -192,6 +192,14 @@ nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open
        }
        if (status)
                goto out;
+
+       /* Openowner is now set, so sequence id will get bumped.  Now we need
+        * these checks before we do any creates: */
+       if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS)
+               return nfserr_grace;
+       if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
+               return nfserr_no_grace;
+
        switch (open->op_claim_type) {
                case NFS4_OPEN_CLAIM_DELEGATE_CUR:
                        status = nfserr_inval;
This page took 0.024734 seconds and 5 git commands to generate.