aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-07-07 20:59:15 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:24:08 -0400
commitb648330a1d741d5df8a5076b2a0a2519c69c8f41 (patch)
treeaa53fc54675d3c7b51aa8f86f5f8929acd0f85a3 /fs/nfsd
parent0fa822e452084032b8495ca0d8e0199329847815 (diff)
[PATCH] nfsd4: ERR_GRACE should bump seqid on open
The GRACE and NOGRACE errors should bump the sequence id on open. So we delay the handling of these errors until nfsd4_process_open2, at which point we've set the open owner, so the encode routine will be able to bump the sequence id. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4proc.c6
-rw-r--r--fs/nfsd/nfs4state.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index d71f14517b9c..e08edc17c6a0 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -169,12 +169,6 @@ nfsd4_open(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open
169 (int)open->op_fname.len, open->op_fname.data, 169 (int)open->op_fname.len, open->op_fname.data,
170 open->op_stateowner); 170 open->op_stateowner);
171 171
172 if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS)
173 return nfserr_grace;
174
175 if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
176 return nfserr_no_grace;
177
178 /* This check required by spec. */ 172 /* This check required by spec. */
179 if (open->op_create && open->op_claim_type != NFS4_OPEN_CLAIM_NULL) 173 if (open->op_create && open->op_claim_type != NFS4_OPEN_CLAIM_NULL)
180 return nfserr_inval; 174 return nfserr_inval;
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index e388c9070de4..568d5deacac0 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1790,6 +1790,12 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
1790 struct nfs4_delegation *dp = NULL; 1790 struct nfs4_delegation *dp = NULL;
1791 int status; 1791 int status;
1792 1792
1793 if (nfs4_in_grace() && open->op_claim_type != NFS4_OPEN_CLAIM_PREVIOUS)
1794 return nfserr_grace;
1795
1796 if (!nfs4_in_grace() && open->op_claim_type == NFS4_OPEN_CLAIM_PREVIOUS)
1797 return nfserr_no_grace;
1798
1793 status = nfserr_inval; 1799 status = nfserr_inval;
1794 if (!TEST_ACCESS(open->op_share_access) || !TEST_DENY(open->op_share_deny)) 1800 if (!TEST_ACCESS(open->op_share_access) || !TEST_DENY(open->op_share_deny))
1795 goto out; 1801 goto out;