From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- Grow.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Grow.c b/Grow.c index 9ee22e0..93a1fba 100644 --- a/Grow.c +++ b/Grow.c @@ -442,13 +442,14 @@ int Grow_addbitmap(char *devname, int fd, char *file, int chunk, int delay, int dv = map_dev(disk.major, disk.minor, 1); if (!dv) continue; fd2 = dev_open(dv, O_RDONLY); - if (fd2 >= 0 && - st->ss->load_super(st, fd2, NULL) == 0) { + if (fd2 >= 0) { + if (st->ss->load_super(st, fd2, NULL) == 0) { + close(fd2); + st->ss->uuid_from_super(st, uuid); + break; + } close(fd2); - st->ss->uuid_from_super(st, uuid); - break; } - close(fd2); } if (d == max_devs) { fprintf(stderr, Name ": cannot find UUID for array!\n"); -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html