]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/nfs4xdr.c
nfsd: return nfserr_minor_vers_mismatch when compound minorversion != 0
[linux-2.6-omap-h63xx.git] / fs / nfsd / nfs4xdr.c
index 9547ab636274de4f65eafad777696ead86a4ed32..413a15332177aeb329d5cfcd4258698a2da2fe62 100644 (file)
@@ -1019,6 +1019,9 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
                }
        }
 
+       if (argp->minorversion != 0)
+               argp->opcnt = 0;
+
        for (i = 0; i < argp->opcnt; i++) {
                op = &argp->ops[i];
                op->replay = NULL;
@@ -1057,13 +1060,6 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
                op->opnum = ntohl(*argp->p++);
 
                switch (op->opnum) {
-               case 2: /* Reserved operation */
-                       op->opnum = OP_ILLEGAL;
-                       if (argp->minorversion == 0)
-                               op->status = nfserr_op_illegal;
-                       else
-                               op->status = nfserr_minor_vers_mismatch;
-                       break;
                case OP_ACCESS:
                        op->status = nfsd4_decode_access(argp, &op->u.access);
                        break;