NFS: Remove no-op less-than-zero checks on unsigned variables.
Introduced by commit 16b374ca
"NFSv4.1: pnfs: filelayout: add driver's
LAYOUTGET and GETDEVICEINFO infrastructure" (October 20, 2010).
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
c6e6966602
commit
e414966b81
@@ -449,9 +449,8 @@ filelayout_check_layout(struct pnfs_layout_hdr *lo,
|
|||||||
|
|
||||||
fl->dsaddr = dsaddr;
|
fl->dsaddr = dsaddr;
|
||||||
|
|
||||||
if (fl->first_stripe_index < 0 ||
|
if (fl->first_stripe_index >= dsaddr->stripe_count) {
|
||||||
fl->first_stripe_index >= dsaddr->stripe_count) {
|
dprintk("%s Bad first_stripe_index %u\n",
|
||||||
dprintk("%s Bad first_stripe_index %d\n",
|
|
||||||
__func__, fl->first_stripe_index);
|
__func__, fl->first_stripe_index);
|
||||||
goto out_put;
|
goto out_put;
|
||||||
}
|
}
|
||||||
@@ -552,7 +551,7 @@ filelayout_decode_layout(struct pnfs_layout_hdr *flo,
|
|||||||
|
|
||||||
/* Note that a zero value for num_fh is legal for STRIPE_SPARSE.
|
/* Note that a zero value for num_fh is legal for STRIPE_SPARSE.
|
||||||
* Futher checking is done in filelayout_check_layout */
|
* Futher checking is done in filelayout_check_layout */
|
||||||
if (fl->num_fh < 0 || fl->num_fh >
|
if (fl->num_fh >
|
||||||
max(NFS4_PNFS_MAX_STRIPE_CNT, NFS4_PNFS_MAX_MULTI_CNT))
|
max(NFS4_PNFS_MAX_STRIPE_CNT, NFS4_PNFS_MAX_MULTI_CNT))
|
||||||
goto out_err;
|
goto out_err;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user