]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
linear: correct disk numbering error check
authorNikanth Karthikesan <knikanth@novell.com>
Fri, 27 Jun 2008 22:31:19 +0000 (08:31 +1000)
committerNeil Brown <neilb@notabene.brown>
Fri, 27 Jun 2008 22:31:19 +0000 (08:31 +1000)
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>
drivers/md/linear.c

index 10748240cb2fde2bd8942dbb19e300cc6c32961c..ec921f58fbb8224cec0772494a75926fbc660be7 100644 (file)
@@ -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;
                }