aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 9547ab636274..413a15332177 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1019,6 +1019,9 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
1019 } 1019 }
1020 } 1020 }
1021 1021
1022 if (argp->minorversion != 0)
1023 argp->opcnt = 0;
1024
1022 for (i = 0; i < argp->opcnt; i++) { 1025 for (i = 0; i < argp->opcnt; i++) {
1023 op = &argp->ops[i]; 1026 op = &argp->ops[i];
1024 op->replay = NULL; 1027 op->replay = NULL;
@@ -1057,13 +1060,6 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
1057 op->opnum = ntohl(*argp->p++); 1060 op->opnum = ntohl(*argp->p++);
1058 1061
1059 switch (op->opnum) { 1062 switch (op->opnum) {
1060 case 2: /* Reserved operation */
1061 op->opnum = OP_ILLEGAL;
1062 if (argp->minorversion == 0)
1063 op->status = nfserr_op_illegal;
1064 else
1065 op->status = nfserr_minor_vers_mismatch;
1066 break;
1067 case OP_ACCESS: 1063 case OP_ACCESS:
1068 op->status = nfsd4_decode_access(argp, &op->u.access); 1064 op->status = nfsd4_decode_access(argp, &op->u.access);
1069 break; 1065 break;