From: NeilBrown Date: Wed, 21 Nov 2012 21:57:25 +0000 (+1100) Subject: Grow: fix bug when multiple arrays present. X-Git-Tag: mdadm-3.3-rc1~143 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae0dcfbdb23f2620f27ecb49338916c36b380e3e;p=thirdparty%2Fmdadm.git Grow: fix bug when multiple arrays present. commit 1f9b0e2845e1ec22dc24dcef275a733c09ff2edd Grow - be careful about 'delayed' reshapes. Introduced a bug where a list of devices longer than 1 would cause an infinite loop. Oops. Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index 52af9bfd..957710a5 100644 --- a/Grow.c +++ b/Grow.c @@ -2947,7 +2947,7 @@ started: struct mdstat_ent *mds, *m; delayed = 0; mds = mdstat_read(0, 0); - for (m = mds; m; m = mds->next) + for (m = mds; m; m = m->next) if (m->devnum == devname2devnum(sra->sys_name)) { if (m->resync && m->percent == RESYNC_DELAYED)