ram_disk: Fix lock assertion failure and use VM_PRIORITY_USER in another place.

Change-Id: Iefd997e7e5838b51e4973f9f69bae6ea07f3b3cb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8584
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
Augustin Cavalier 2024-11-18 16:41:46 -05:00 committed by waddlesplash
parent 7af4c8a6a9
commit 87e00819ce

View File

@ -321,7 +321,9 @@ struct RawDevice : Device, DoublyLinkedListLinkImpl<RawDevice> {
fCache->temporary = 1;
fCache->virtual_end = fDeviceSize;
error = fCache->Commit(fDeviceSize, VM_PRIORITY_SYSTEM);
fCache->Lock();
error = fCache->Commit(fDeviceSize, VM_PRIORITY_USER);
fCache->Unlock();
if (error != B_OK) {
Unprepare();
return error;