diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2011-10-25 12:18:03 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-10-31 11:52:47 -0400 |
commit | e414966b81a74745ac8d6bfeda0d95fb721e6d91 (patch) | |
tree | a4851a80ca1b1fd965da9f475135356ab872db59 /fs/nfs | |
parent | c6e696660213a89a5bfde8b49d539553904c808f (diff) |
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4filelayout.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c index 09119418402f..12185aadb349 100644 --- a/fs/nfs/nfs4filelayout.c +++ b/fs/nfs/nfs4filelayout.c | |||
@@ -449,9 +449,8 @@ filelayout_check_layout(struct pnfs_layout_hdr *lo, | |||
449 | 449 | ||
450 | fl->dsaddr = dsaddr; | 450 | fl->dsaddr = dsaddr; |
451 | 451 | ||
452 | if (fl->first_stripe_index < 0 || | 452 | if (fl->first_stripe_index >= dsaddr->stripe_count) { |
453 | fl->first_stripe_index >= dsaddr->stripe_count) { | 453 | dprintk("%s Bad first_stripe_index %u\n", |
454 | dprintk("%s Bad first_stripe_index %d\n", | ||
455 | __func__, fl->first_stripe_index); | 454 | __func__, fl->first_stripe_index); |
456 | goto out_put; | 455 | goto out_put; |
457 | } | 456 | } |
@@ -552,7 +551,7 @@ filelayout_decode_layout(struct pnfs_layout_hdr *flo, | |||
552 | 551 | ||
553 | /* Note that a zero value for num_fh is legal for STRIPE_SPARSE. | 552 | /* Note that a zero value for num_fh is legal for STRIPE_SPARSE. |
554 | * Futher checking is done in filelayout_check_layout */ | 553 | * Futher checking is done in filelayout_check_layout */ |
555 | if (fl->num_fh < 0 || fl->num_fh > | 554 | if (fl->num_fh > |
556 | max(NFS4_PNFS_MAX_STRIPE_CNT, NFS4_PNFS_MAX_MULTI_CNT)) | 555 | max(NFS4_PNFS_MAX_STRIPE_CNT, NFS4_PNFS_MAX_MULTI_CNT)) |
557 | goto out_err; | 556 | goto out_err; |
558 | 557 | ||