Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c954e2a5d1c9662991a41282297ddebcadee0578
Commit:     c954e2a5d1c9662991a41282297ddebcadee0578
Parent:     7191155bd3abbbf62368a0528f7610741d007a58
Author:     J.Bruce Fields <[EMAIL PROTECTED]>
AuthorDate: Wed Dec 13 00:35:31 2006 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Dec 13 09:05:54 2006 -0800

    [PATCH] knfsd: nfsd4: make verify and nverify wrappers
    
    Make wrappers for verify and nverify, for consistency with other ops.
    
    Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]>
    Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/nfsd/nfs4proc.c |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 9fcf46a..8fc2cab 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -681,7 +681,7 @@ nfsd4_write(struct svc_rqst *rqstp, struct 
nfsd4_compound_state *cstate,
  * to NFS_OK after the call; NVERIFY by mapping NFSERR_NOT_SAME to NFS_OK.
  */
 static __be32
-nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+_nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
             struct nfsd4_verify *verify)
 {
        __be32 *buf, *p;
@@ -733,6 +733,26 @@ out_kfree:
        return status;
 }
 
+static __be32
+nfsd4_nverify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+             struct nfsd4_verify *verify)
+{
+       __be32 status;
+
+       status = _nfsd4_verify(rqstp, cstate, verify);
+       return status == nfserr_not_same ? nfs_ok : status;
+}
+
+static __be32
+nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
+            struct nfsd4_verify *verify)
+{
+       __be32 status;
+
+       status = _nfsd4_verify(rqstp, cstate, verify);
+       return status == nfserr_same ? nfs_ok : status;
+}
+
 /*
  * NULL call.
  */
@@ -911,10 +931,8 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
                        op->status = nfsd4_lookupp(rqstp, cstate);
                        break;
                case OP_NVERIFY:
-                       op->status = nfsd4_verify(rqstp, cstate,
+                       op->status = nfsd4_nverify(rqstp, cstate,
                                                  &op->u.nverify);
-                       if (op->status == nfserr_not_same)
-                               op->status = nfs_ok;
                        break;
                case OP_OPEN:
                        op->status = nfsd4_open(rqstp, cstate,
@@ -975,8 +993,6 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
                case OP_VERIFY:
                        op->status = nfsd4_verify(rqstp, cstate,
                                                  &op->u.verify);
-                       if (op->status == nfserr_same)
-                               op->status = nfs_ok;
                        break;
                case OP_WRITE:
                        op->status = nfsd4_write(rqstp, cstate, &op->u.write);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to