aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ.Bruce Fields <bfields@fieldses.org>2006-12-13 03:35:31 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-13 12:05:54 -0500
commitc954e2a5d1c9662991a41282297ddebcadee0578 (patch)
tree21d3a470d6f76365a27224926e218da788d16b04
parent7191155bd3abbbf62368a0528f7610741d007a58 (diff)
[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 <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/nfsd/nfs4proc.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 9fcf46a7d95d..8fc2cab9d76a 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,
681 * to NFS_OK after the call; NVERIFY by mapping NFSERR_NOT_SAME to NFS_OK. 681 * to NFS_OK after the call; NVERIFY by mapping NFSERR_NOT_SAME to NFS_OK.
682 */ 682 */
683static __be32 683static __be32
684nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, 684_nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
685 struct nfsd4_verify *verify) 685 struct nfsd4_verify *verify)
686{ 686{
687 __be32 *buf, *p; 687 __be32 *buf, *p;
@@ -733,6 +733,26 @@ out_kfree:
733 return status; 733 return status;
734} 734}
735 735
736static __be32
737nfsd4_nverify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
738 struct nfsd4_verify *verify)
739{
740 __be32 status;
741
742 status = _nfsd4_verify(rqstp, cstate, verify);
743 return status == nfserr_not_same ? nfs_ok : status;
744}
745
746static __be32
747nfsd4_verify(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
748 struct nfsd4_verify *verify)
749{
750 __be32 status;
751
752 status = _nfsd4_verify(rqstp, cstate, verify);
753 return status == nfserr_same ? nfs_ok : status;
754}
755
736/* 756/*
737 * NULL call. 757 * NULL call.
738 */ 758 */
@@ -911,10 +931,8 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
911 op->status = nfsd4_lookupp(rqstp, cstate); 931 op->status = nfsd4_lookupp(rqstp, cstate);
912 break; 932 break;
913 case OP_NVERIFY: 933 case OP_NVERIFY:
914 op->status = nfsd4_verify(rqstp, cstate, 934 op->status = nfsd4_nverify(rqstp, cstate,
915 &op->u.nverify); 935 &op->u.nverify);
916 if (op->status == nfserr_not_same)
917 op->status = nfs_ok;
918 break; 936 break;
919 case OP_OPEN: 937 case OP_OPEN:
920 op->status = nfsd4_open(rqstp, cstate, 938 op->status = nfsd4_open(rqstp, cstate,
@@ -975,8 +993,6 @@ nfsd4_proc_compound(struct svc_rqst *rqstp,
975 case OP_VERIFY: 993 case OP_VERIFY:
976 op->status = nfsd4_verify(rqstp, cstate, 994 op->status = nfsd4_verify(rqstp, cstate,
977 &op->u.verify); 995 &op->u.verify);
978 if (op->status == nfserr_same)
979 op->status = nfs_ok;
980 break; 996 break;
981 case OP_WRITE: 997 case OP_WRITE:
982 op->status = nfsd4_write(rqstp, cstate, &op->u.write); 998 op->status = nfsd4_write(rqstp, cstate, &op->u.write);