bfs: Fixed missing block allocator uninit in case of error

* If Volume::Mount() failed opening the root node, the Volume would be
  destroyed regardless of the fact that the block allocator was
  initializing the bitmap asynchronously.
* For a proper shutdown, the block allocator needs to be uninitialized
  first.
* This should fix #15015.

Change-Id: Ice520a12c5c58c785f391009327becfb1f284bce
Reviewed-on: https://review.haiku-os.org/c/1501
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Axel Dörfler
2019-06-14 15:02:13 +00:00
parent e5a393474b
commit 7b1178998d
@@ -1,5 +1,5 @@
/*
* Copyright 2001-2017, Axel Dörfler, [email protected].
* Copyright 2001-2019, Axel Dörfler, [email protected].
* This file may be used under the terms of the MIT License.
*/
@@ -435,6 +435,9 @@ Volume::Mount(const char* deviceName, uint32 flags)
} else {
status = B_BAD_VALUE;
FATAL(("could not create root node!\n"));
// We need to wait for the block allocator to finish
fBlockAllocator.Uninitialize();
return status;
}