From 7b1178998ddedc527ebc9cebc231088b41ea9975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 13 Jun 2019 09:01:51 +0200 Subject: [PATCH] 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 --- src/add-ons/kernel/file_systems/bfs/Volume.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Volume.cpp b/src/add-ons/kernel/file_systems/bfs/Volume.cpp index 2bba67caaf..5327b9b22d 100644 --- a/src/add-ons/kernel/file_systems/bfs/Volume.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Volume.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2017, Axel Dörfler, axeld@pinc-software.de. + * Copyright 2001-2019, Axel Dörfler, axeld@pinc-software.de. * 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; }