]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
NFS: Remove an unneeded check in decode_compound_header_arg()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 26 Oct 2007 17:33:01 +0000 (13:33 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 30 Jan 2008 07:05:46 +0000 (02:05 -0500)
Clean up:  The header tag length is unsigned, so checking that it is less
than zero is unnecessary.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/callback_xdr.c

index 058ade7efe79407847b1af74a6d73bcbf90e0aec..97abd829e4327ca3d065279e58f2dcb25f6632b7 100644 (file)
@@ -139,7 +139,7 @@ static __be32 decode_compound_hdr_arg(struct xdr_stream *xdr, struct cb_compound
        if (unlikely(status != 0))
                return status;
        /* We do not like overly long tags! */
-       if (hdr->taglen > CB_OP_TAGLEN_MAXSZ-12 || hdr->taglen < 0) {
+       if (hdr->taglen > CB_OP_TAGLEN_MAXSZ - 12) {
                printk("NFSv4 CALLBACK %s: client sent tag of length %u\n",
                                __FUNCTION__, hdr->taglen);
                return htonl(NFS4ERR_RESOURCE);