]> err.no Git - linux-2.6/blobdiff - fs/nfsd/nfs4xdr.c
Merge branch 'cfq-merge' of git://brick.kernel.dk/data/git/linux-2.6-block
[linux-2.6] / fs / nfsd / nfs4xdr.c
index 69d3501173a8e79b2b0c01c167a45713f5867c2a..03857fd8112632a044ddab6d0a4ade576e762298 100644 (file)
@@ -992,7 +992,7 @@ nfsd4_decode_compound(struct nfsd4_compoundargs *argp)
        if (argp->opcnt > 100)
                goto xdr_error;
 
-       if (argp->opcnt > sizeof(argp->iops)/sizeof(argp->iops[0])) {
+       if (argp->opcnt > ARRAY_SIZE(argp->iops)) {
                argp->ops = kmalloc(argp->opcnt * sizeof(*argp->ops), GFP_KERNEL);
                if (!argp->ops) {
                        argp->ops = argp->iops;