aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorNikanth Karthikesan <knikanth@novell.com>2008-06-27 18:31:19 -0400
committerNeil Brown <neilb@notabene.brown>2008-06-27 18:31:19 -0400
commit13864515f7bf6cabd60e63c62e09d311386ae1f1 (patch)
tree3f46035321aedab46c787cac01b17e6b24934423 /drivers/md
parent9bbbca3a0ee09293108b67835c6bdf6196d7bcb3 (diff)
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')
-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 10748240cb2f..ec921f58fbb8 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)
126 int j = rdev->raid_disk; 126 int j = rdev->raid_disk;
127 dev_info_t *disk = conf->disks + j; 127 dev_info_t *disk = conf->disks + j;
128 128
129 if (j < 0 || j > raid_disks || disk->rdev) { 129 if (j < 0 || j >= raid_disks || disk->rdev) {
130 printk("linear: disk numbering problem. Aborting!\n"); 130 printk("linear: disk numbering problem. Aborting!\n");
131 goto out; 131 goto out;
132 } 132 }