[PATCH md 002 of 6] Don't allow new md/bitmap file to be set if one already exists

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

 



... otherwise we loose a reference and can never free the file.

Signed-off-by: Neil Brown <neilb@xxxxxxxxxxxxxxx>

### Diffstat output
 ./drivers/md/md.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~	2005-08-09 10:22:01.000000000 +1000
+++ ./drivers/md/md.c	2005-08-09 10:25:22.000000000 +1000
@@ -2430,7 +2430,7 @@ static int set_bitmap_file(mddev_t *mdde
 {
 	int err;
 
-	if (mddev->pers)
+	if (mddev->pers || mddev->bitmap_file)
 		return -EBUSY;
 
 	mddev->bitmap_file = fget(fd);
-
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