From: NeilBrown Date: Mon, 17 Oct 2011 05:51:31 +0000 (+1100) Subject: Grow: Only ping monitor on level change if array is container based. X-Git-Tag: mdadm-3.2.3~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fde139b91e0477d500015e0838e0bc180f1befba;p=thirdparty%2Fmdadm.git Grow: Only ping monitor on level change if array is container based. Pinging the monitor for a NULL container is bad. Reported-by: Daniel Kahn Gillmor Tested-by: Daniel Kahn Gillmor Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index 4f8b9d74..0e4dd108 100644 --- a/Grow.c +++ b/Grow.c @@ -1648,8 +1648,12 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, rv = 1; goto release; } - /* FIXME this is added with no justification - why is it here */ - ping_monitor(container); + /* Make sure mdmon has seen the device removal + * and updated metadata before we continue with + * level change + */ + if (container) + ping_monitor(container); } memset(&info, 0, sizeof(info));