tree 708b1546c179e7d6fc31213528d32f4ab4ff13a8
parent 844e8d904a7c1446e3f040683b4a0645c3eb168f
author NeilBrown <[EMAIL PROTECTED]> Sat, 10 Sep 2005 06:23:43 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Sat, 10 Sep 2005 06:39:09 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

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

diff --git a/drivers/md/md.c b/drivers/md/md.c
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to