ramfs: Volume->WriteLock but do not unlock in unmount.

As, of course, we are deleting it. This problem was obscured by the
one fixed by the previous commit.
This commit is contained in:
Augustin Cavalier 2022-11-30 00:24:36 -05:00
parent 605ecac1ee
commit 4e742d81ab

View File

@ -120,7 +120,7 @@ ramfs_unmount(fs_volume* _volume)
FUNCTION_START();
Volume* volume = (Volume*)_volume->private_volume;
status_t error = B_OK;
if (VolumeWriteLocker locker = volume) {
if (volume->WriteLock()) {
error = volume->Unmount();
if (error == B_OK)
delete volume;