From: Dan Williams Date: Wed, 30 Sep 2009 18:44:38 +0000 (-0700) Subject: imsm: kill close() of component device X-Git-Tag: mdadm-3.0.3~15^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51725a7c2569b764f59f009bc0ef42901a1ec915;p=thirdparty%2Fmdadm.git imsm: kill close() of component device None of the other formats close the passed in fd at load, and this becomes a problem when trying to support --update where we need O_EXCL protection across the entire operation. Signed-off-by: Dan Williams --- diff --git a/super-intel.c b/super-intel.c index 9f57a681..80cd6c59 100644 --- a/super-intel.c +++ b/super-intel.c @@ -1685,10 +1685,8 @@ load_imsm_disk(int fd, struct intel_super *super, char *devname, int keep_fd) serialcpy(dl->serial, serial); dl->index = -2; dl->e = NULL; - } else if (keep_fd) { - close(dl->fd); + } else if (keep_fd) dl->fd = fd; - } /* look up this disk's index in the current anchor */ for (i = 0; i < super->anchor->num_disks; i++) {