Close fd2 as soon as it is no longer needed, before calling
Grow_continue(). Otherwise, we won't be able to stop an array with
external metadata during reshape, because mdadm running in background
will be keeping it open.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Signed-off-by: NeilBrown <neilb@suse.com>
sysfs_init(content, fd2, mdstat->devnm);
+ close(fd2);
+ fd2 = -1;
+
/* start mdmon in case it is not running
*/
if (!mdmon_running(container))