summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-09-10 01:23:43 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 01:39:09 +0200
commit1923b99a0f4748aa6be0b9b9523ce224a3449b17 (patch)
tree708b1546c179e7d6fc31213528d32f4ab4ff13a8 /drivers
parent[PATCH] dm: fix rh_dec()/rh_inc() race in dm-raid1.c (diff)
downloadlinux-1923b99a0f4748aa6be0b9b9523ce224a3449b17.tar.xz
linux-1923b99a0f4748aa6be0b9b9523ce224a3449b17.zip
[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 <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 373ab92e367b..63c566165189 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);