[PATCH 13/16] nfsd4: make verify and nverify wrappers
J. Bruce Fields
bfields at fieldses.org
Fri Dec 1 14:41:23 EST 2006
From: J. Bruce Fields <bfields at fieldses.org>
Make wrappers for verify and nverify, for consistency with other ops.
Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>
---
fs/nfsd/nfs4proc.c | 26 ++++++++++++++++++++------
1 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 664c6ea..00d0697 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -655,7 +655,7 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct
* 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, struct nfsd4_verify *verify)
+_nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_verify *verify)
{
__be32 *buf, *p;
int count;
@@ -705,6 +705,24 @@ 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.
*/
@@ -876,9 +894,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
op->status = nfsd4_lookupp(rqstp, cstate);
break;
case OP_NVERIFY:
- op->status = nfsd4_verify(rqstp, cstate, &op->u.nverify);
- if (op->status == nfserr_not_same)
- op->status = nfs_ok;
+ op->status = nfsd4_nverify(rqstp, cstate, &op->u.nverify);
break;
case OP_OPEN:
op->status = nfsd4_open(rqstp, cstate, &op->u.open);
@@ -930,8 +946,6 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
break;
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);
More information about the NFSv4
mailing list