The patch titled

     nfsd4: ERR_GRACE should bump seqid on open

has been added to the -mm tree.  Its filename is

     nfsd4-err_grace-should-bump-seqid-on-open.patch

Patches currently in -mm which might be from [EMAIL PROTECTED] are

coverity-sunrpc-xprt-task-null-check.patch
nfsd4-reboot-recovery-fix.patch
nfsd4-fix-syncing-of-recovery-directory.patch
nfsd4-lookup_one_len-takes-i_sem.patch
nfsd4-prevent-multiple-unlinks-of-recovery-directories.patch
nfsd4-fix-release_lockowner.patch
nfsd4-err_grace-should-bump-seqid-on-open.patch
nfsd4-err_grace-should-bump-seqid-on-lock.patch
nfsd4-stop-overusing-reclaim_bad.patch
nfsd4-comment-indentation.patch
nfsd4-fix-open_reclaim-seqid.patch
nfsd4-seqid-comments.patch
nfsd4-relax-new-lock-seqid-check.patch
nfsd4-always-update-stateid-on-open.patch
nfsd4-return-better-error-on-io-incompatible-with-open-mode.patch
nfsd4-renew-lease-on-seqid-modifying-operations.patch
nfsd4-clarify-close_lru-handling.patch
nfsd4-clean-up-nfs4_preprocess_seqid_op.patch
nfsd4-check-lock-type-against-openmode.patch
nfsd4-fix-fh_expire_type.patch
xdr-input-validation.patch



From: NeilBrown <[EMAIL PROTECTED]>

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 <[EMAIL PROTECTED]>
Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---

 fs/nfsd/nfs4proc.c  |    6 ------
 fs/nfsd/nfs4state.c |    6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff -puN fs/nfsd/nfs4proc.c~nfsd4-err_grace-should-bump-seqid-on-open 
fs/nfsd/nfs4proc.c
--- 25/fs/nfsd/nfs4proc.c~nfsd4-err_grace-should-bump-seqid-on-open     Wed Jul 
 6 13:08:28 2005
+++ 25-akpm/fs/nfsd/nfs4proc.c  Wed Jul  6 13:08:28 2005
@@ -169,12 +169,6 @@ nfsd4_open(struct svc_rqst *rqstp, struc
                (int)open->op_fname.len, open->op_fname.data,
                open->op_stateowner);
 
-       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;
-
        /* This check required by spec. */
        if (open->op_create && open->op_claim_type != NFS4_OPEN_CLAIM_NULL)
                return nfserr_inval;
diff -puN fs/nfsd/nfs4state.c~nfsd4-err_grace-should-bump-seqid-on-open 
fs/nfsd/nfs4state.c
--- 25/fs/nfsd/nfs4state.c~nfsd4-err_grace-should-bump-seqid-on-open    Wed Jul 
 6 13:08:28 2005
+++ 25-akpm/fs/nfsd/nfs4state.c Wed Jul  6 13:08:28 2005
@@ -1790,6 +1790,12 @@ nfsd4_process_open2(struct svc_rqst *rqs
        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;
_
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to