Skip to contentSkip to conversation

max_dev bug in super_1_sync

PATCH New Paul Clements 1 participant 1 message Feb 21, 2005 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 max_dev bug in super_1_sync

Neil,

I don't know if you've seen this one yet, but it looks like there's a small bug in super_1_sync. Patch attached.

--
Paul

drivers/md/md.c +1 -1
@@ -1018,7 +1018,7 @@ static void super_1_sync(mddev_t *mddev,
 	
 	sb->max_dev = cpu_to_le32(max_dev);
 	for (i=0; i<max_dev;i++)
-		sb->dev_roles[max_dev] = cpu_to_le16(0xfffe);
+		sb->dev_roles[i] = cpu_to_le16(0xfffe);
 	
 	ITERATE_RDEV(mddev,rdev2,tmp) {
 		i = rdev2->desc_nr;