2009-12-12 04:03:35

by Labiaga, Ricardo

[permalink] [raw]
Subject: [PATCH] nfsd4: Use FIRST_NFS4_OP in nfsd4_decode_compound()

Since we're checking for LAST_NFS4_OP, use FIRST_NFS4_OP to be consistent.

Signed-off-by: Ricardo Labiaga <[email protected]>
---
fs/nfsd/nfs4xdr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index b83a24c..3fe0a00 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1442,7 +1442,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
}
op->opnum = ntohl(*argp->p++);

- if (op->opnum >= OP_ACCESS && op->opnum <= LAST_NFS4_OP)
+ if (op->opnum >= FIRST_NFS4_OP && op->opnum <= LAST_NFS4_OP)
op->status = ops->decoders[op->opnum](argp, &op->u);
else {
op->opnum = OP_ILLEGAL;
--
1.5.4.3



2009-12-17 16:50:47

by J. Bruce Fields

[permalink] [raw]
Subject: Re: [PATCH] nfsd4: Use FIRST_NFS4_OP in nfsd4_decode_compound()

On Fri, Dec 11, 2009 at 08:03:27PM -0800, Ricardo Labiaga wrote:
> Since we're checking for LAST_NFS4_OP, use FIRST_NFS4_OP to be consistent.

Got it, thanks.--b.

>
> Signed-off-by: Ricardo Labiaga <[email protected]>
> ---
> fs/nfsd/nfs4xdr.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index b83a24c..3fe0a00 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -1442,7 +1442,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
> }
> op->opnum = ntohl(*argp->p++);
>
> - if (op->opnum >= OP_ACCESS && op->opnum <= LAST_NFS4_OP)
> + if (op->opnum >= FIRST_NFS4_OP && op->opnum <= LAST_NFS4_OP)
> op->status = ops->decoders[op->opnum](argp, &op->u);
> else {
> op->opnum = OP_ILLEGAL;
> --
> 1.5.4.3
>