diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 99bebea20668..83db5a742aa9 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -1585,11 +1585,13 @@ static nfsd4_dec nfsd4_dec_ops[] = { | |||
1585 | static inline bool | 1585 | static inline bool |
1586 | nfsd4_opnum_in_range(struct nfsd4_compoundargs *argp, struct nfsd4_op *op) | 1586 | nfsd4_opnum_in_range(struct nfsd4_compoundargs *argp, struct nfsd4_op *op) |
1587 | { | 1587 | { |
1588 | if (op->opnum < FIRST_NFS4_OP || op->opnum > LAST_NFS4_OP) | 1588 | if (op->opnum < FIRST_NFS4_OP) |
1589 | return false; | 1589 | return false; |
1590 | else if (argp->minorversion == 0 && op->opnum > OP_RELEASE_LOCKOWNER) | 1590 | else if (argp->minorversion == 0 && op->opnum > LAST_NFS40_OP) |
1591 | return false; | 1591 | return false; |
1592 | else if (argp->minorversion == 1 && op->opnum > OP_RECLAIM_COMPLETE) | 1592 | else if (argp->minorversion == 1 && op->opnum > LAST_NFS41_OP) |
1593 | return false; | ||
1594 | else if (argp->minorversion == 2 && op->opnum > LAST_NFS42_OP) | ||
1593 | return false; | 1595 | return false; |
1594 | return true; | 1596 | return true; |
1595 | } | 1597 | } |