[mdadm PATCH 02/12] imsm: kill close() of component device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 super-intel.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/super-intel.c b/super-intel.c
index 9f57a68..80cd6c5 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++) {

--
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

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux