As free_super now closes fds for member devices, rather than
write_init_super doing it, we need to call free_super earlier,
so that the device (on which we hold an O_EXCL open) is closed
before it is added to the array.
So close at the end of pass-1 rather than after pass-2.
Signed-off-by: NeilBrown <neilb@suse.de>
Name ": ADD_NEW_DISK for %s "
"failed: %s\n",
dv->devname, strerror(errno));
Name ": ADD_NEW_DISK for %s "
"failed: %s\n",
dv->devname, strerror(errno));
- st->ss->free_super(st);
map_unlock(&map);
flush_metadata_updates(st);
map_unlock(&map);
flush_metadata_updates(st);
+ st->ss->free_super(st);
- st->ss->free_super(st);
if (level == LEVEL_CONTAINER) {
/* No need to start. But we should signal udev to
if (level == LEVEL_CONTAINER) {
/* No need to start. But we should signal udev to