From: Nikanth Karthikesan Date: Fri, 27 Jun 2008 22:31:19 +0000 (+1000) Subject: linear: correct disk numbering error check X-Git-Tag: v2.6.27-rc1~957^2~54 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13864515f7bf6cabd60e63c62e09d311386ae1f1;p=linux-2.6 linear: correct disk numbering error check From: "Nikanth Karthikesan" Correct disk numbering problem check. Signed-off-by: Nikanth Karthikesan Signed-off-by: Neil Brown --- diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 10748240cb..ec921f58fb 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; }