summaryrefslogtreecommitdiffstats
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorNikanth Karthikesan <knikanth@novell.com>2008-06-28 08:31:19 +1000
committerNeil Brown <neilb@notabene.brown>2008-06-28 08:31:19 +1000
commit13864515f7bf6cabd60e63c62e09d311386ae1f1 (patch)
tree3f46035321aedab46c787cac01b17e6b24934423 /drivers/md/linear.c
parent9bbbca3a0ee09293108b67835c6bdf6196d7bcb3 (diff)
downloadop-kernel-dev-13864515f7bf6cabd60e63c62e09d311386ae1f1.zip
op-kernel-dev-13864515f7bf6cabd60e63c62e09d311386ae1f1.tar.gz
linear: correct disk numbering error check
From: "Nikanth Karthikesan" <knikanth@novell.com> Correct disk numbering problem check. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r--drivers/md/linear.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 1074824..ec921f5 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -126,7 +126,7 @@ static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
int j = rdev->raid_disk;
dev_info_t *disk = conf->disks + j;
- if (j < 0 || j > raid_disks || disk->rdev) {
+ if (j < 0 || j >= raid_disks || disk->rdev) {
printk("linear: disk numbering problem. Aborting!\n");
goto out;
}
OpenPOWER on IntegriCloud