Commit c954e2a5 authored by J.Bruce Fields's avatar J.Bruce Fields Committed by Linus Torvalds

[PATCH] knfsd: nfsd4: make verify and nverify wrappers

Make wrappers for verify and nverify, for consistency with other ops.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7191155b
...@@ -681,7 +681,7 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, ...@@ -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. * to NFS_OK after the call; NVERIFY by mapping NFSERR_NOT_SAME to NFS_OK.
*/ */
static __be32 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) struct nfsd4_verify *verify)
{ {
__be32 *buf, *p; __be32 *buf, *p;
...@@ -733,6 +733,26 @@ out_kfree: ...@@ -733,6 +733,26 @@ out_kfree:
return status; 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. * NULL call.
*/ */
...@@ -911,10 +931,8 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, ...@@ -911,10 +931,8 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
op->status = nfsd4_lookupp(rqstp, cstate); op->status = nfsd4_lookupp(rqstp, cstate);
break; break;
case OP_NVERIFY: case OP_NVERIFY:
op->status = nfsd4_verify(rqstp, cstate, op->status = nfsd4_nverify(rqstp, cstate,
&op->u.nverify); &op->u.nverify);
if (op->status == nfserr_not_same)
op->status = nfs_ok;
break; break;
case OP_OPEN: case OP_OPEN:
op->status = nfsd4_open(rqstp, cstate, op->status = nfsd4_open(rqstp, cstate,
...@@ -975,8 +993,6 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, ...@@ -975,8 +993,6 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
case OP_VERIFY: case OP_VERIFY:
op->status = nfsd4_verify(rqstp, cstate, op->status = nfsd4_verify(rqstp, cstate,
&op->u.verify); &op->u.verify);
if (op->status == nfserr_same)
op->status = nfs_ok;
break; break;
case OP_WRITE: case OP_WRITE:
op->status = nfsd4_write(rqstp, cstate, &op->u.write); op->status = nfsd4_write(rqstp, cstate, &op->u.write);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment