summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 99bebea..83db5a7 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1585,11 +1585,13 @@ static nfsd4_dec nfsd4_dec_ops[] = {
static inline bool
nfsd4_opnum_in_range(struct nfsd4_compoundargs *argp, struct nfsd4_op *op)
{
- if (op->opnum < FIRST_NFS4_OP || op->opnum > LAST_NFS4_OP)
+ if (op->opnum < FIRST_NFS4_OP)
return false;
- else if (argp->minorversion == 0 && op->opnum > OP_RELEASE_LOCKOWNER)
+ else if (argp->minorversion == 0 && op->opnum > LAST_NFS40_OP)
return false;
- else if (argp->minorversion == 1 && op->opnum > OP_RECLAIM_COMPLETE)
+ else if (argp->minorversion == 1 && op->opnum > LAST_NFS41_OP)
+ return false;
+ else if (argp->minorversion == 2 && op->opnum > LAST_NFS42_OP)
return false;
return true;
}
OpenPOWER on IntegriCloud