aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-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);