]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: kill close() of component device
authorDan Williams <dan.j.williams@intel.com>
Wed, 30 Sep 2009 18:44:38 +0000 (11:44 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 30 Sep 2009 18:44:38 +0000 (11:44 -0700)
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 <dan.j.williams@intel.com>
super-intel.c

index 9f57a681538635a718f8325a5a378323bff3bab3..80cd6c5960c7bd3e04ac84fa75cb9cd039384e39 100644 (file)
@@ -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++) {