Skip to content

Commit

Permalink
linear: correct disk numbering error check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nikanth Karthikesan authored and Neil Brown committed Jun 27, 2008
1 parent 9bbbca3 commit 1386451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1386451

Please sign in to comment.