diff options
-rw-r--r-- | super1.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1096,7 +1096,7 @@ static int write_init_super1(struct supertype *st) unsigned long long dsize, array_size; unsigned long long sb_offset, headroom; - for (di = st->info; di && ! rv ; di = di->next) { + for (di = st->info; di; di = di->next) { if (di->disk.state == 1) continue; if (di->fd < 0) @@ -1242,6 +1242,8 @@ static int write_init_super1(struct supertype *st) rv = st->ss->write_bitmap(st, di->fd); close(di->fd); di->fd = -1; + if (rv) + goto error_out; } error_out: if (rv) |