提交 1923b99a 编写于 作者: N NeilBrown 提交者: Linus Torvalds

[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: NNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 844e8d90
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册