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 <dkg@fifthhorseman.net>
Tested-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2011-10-17 16:51:31 +11:00
parent fca13185fc
commit fde139b91e
1 changed files with 6 additions and 2 deletions

8
Grow.c
View File

@ -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));