Create: add error checking for 'write_init_super'.
If this fails, we really must fail the whole 'create'. Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
e9b11feec8
commit
ab80e597ba
8
Create.c
8
Create.c
|
@ -890,7 +890,13 @@ int Create(struct supertype *st, char *mddev,
|
|||
me = map_by_devnum(&map, st->container_dev);
|
||||
}
|
||||
|
||||
st->ss->write_init_super(st);
|
||||
if (st->ss->write_init_super(st)) {
|
||||
fprintf(stderr,
|
||||
Name ": Failed to write metadata to %s\n",
|
||||
dv->devname);
|
||||
st->ss->free_super(st);
|
||||
goto abort;
|
||||
}
|
||||
|
||||
/* update parent container uuid */
|
||||
if (me) {
|
||||
|
|
Loading…
Reference in New Issue