From 4ed3d32dd680222c45eabe9d385daae8de2b81c1 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Wed, 18 Jan 2006 17:43:36 -0800 Subject: [PATCH] --- yaml --- r: 18961 b: refs/heads/master c: fb553c0f17444e090db951b96df4d2d71b4f4b6b h: refs/heads/master i: 18959: 4cb55754c8d58e4d63ff6329a78b376834051268 v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4proc.c | 8 ++++++++ trunk/fs/nfsd/nfs4state.c | 6 ------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 30460366d2cf..ee1e75f33775 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f442aa299bb47046db4077d9c122a1b539311ce +refs/heads/master: fb553c0f17444e090db951b96df4d2d71b4f4b6b diff --git a/trunk/fs/nfsd/nfs4proc.c b/trunk/fs/nfsd/nfs4proc.c index 89028f2d8d26..b3f169f400db 100644 --- a/trunk/fs/nfsd/nfs4proc.c +++ b/trunk/fs/nfsd/nfs4proc.c @@ -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; diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index b92dc9e08973..7167dcf8e1fe 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -1732,12 +1732,6 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf struct nfs4_delegation *dp = NULL; int status; - 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; - status = nfserr_inval; if (!TEST_ACCESS(open->op_share_access) || !TEST_DENY(open->op_share_deny)) goto out;