From 1923b99a0f4748aa6be0b9b9523ce224a3449b17 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 9 Sep 2005 16:23:43 -0700 Subject: [PATCH] md: don't allow new md/bitmap file to be set if one already exists ... otherwise we loose a reference and can never free the file. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/md/md.c b/drivers/md/md.c index 373ab92e367..63c56616518 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2430,7 +2430,7 @@ static int set_bitmap_file(mddev_t *mddev, int fd) { int err; - if (mddev->pers) + if (mddev->pers || mddev->bitmap_file) return -EBUSY; mddev->bitmap_file = fget(fd); -- cgit v1.2.3