From: Neil Brown Date: Tue, 7 Jun 2005 23:16:35 +0000 (+0000) Subject: Fix create bug which initialised superblocks wrongly. X-Git-Tag: mdadm-2.0-devel-1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaac7dde0997d00241fea29b6e23659b7d167a65;p=thirdparty%2Fmdadm.git Fix create bug which initialised superblocks wrongly. Description... Signed-off-by: Neil Brown --- diff --git a/Create.c b/Create.c index e1b17373..de9a44f9 100644 --- a/Create.c +++ b/Create.c @@ -417,12 +417,12 @@ int Create(struct supertype *st, char *mddev, int mdfd, disk.minor = minor(stb.st_rdev); close(fd); } - if (disk.state != 1) switch(pass){ case 1: st->ss->add_to_super(super, &disk); break; case 2: + if (disk.state == 1) break; st->ss->write_init_super(st, super, &disk, dv->devname); if (ioctl(mdfd, ADD_NEW_DISK, &disk)) {