mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[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]>
This commit is contained in:
parent
844e8d904a
commit
1923b99a0f
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue