Linux RAID subsystem development
 help / color / mirror / Atom feed
* [PATCH] linear: correct disk numbering error check
@ 2008-06-13  8:37 Nikanth Karthikesan
  2008-06-16 22:54 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Nikanth Karthikesan @ 2008-06-13  8:37 UTC (permalink / raw)
  To: mingo, neilb; +Cc: linux-raid

Correct disk numbering problem check.

Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>

---
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;
 		}



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-06-16 22:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-13  8:37 [PATCH] linear: correct disk numbering error check Nikanth Karthikesan
2008-06-16 22:54 ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox