mirror of
https://review.haiku-os.org/haiku
synced 2025-02-22 13:38:56 +01:00
kernel/vm: Fix copy/paste bug in vm_cache_acquire_locked_page_cache.
This fixes a regression from 9e89f7c068c3b3b4c9d74bb82679c27a2c12b10a. Even if SwitchFromReadLock fails, the original read lock has been released, and so we need to re-acquire the lock before continuing. Should fix a KDL reported by X512.
This commit is contained in:
parent
cd333360b3
commit
eb26bd6c47
@ -593,7 +593,7 @@ vm_cache_acquire_locked_page_cache(vm_page* page, bool dontWait)
|
||||
VMCache* cache = cacheRef->cache;
|
||||
if (!cache->SwitchFromReadLock(&sCacheListLock)) {
|
||||
// cache has been deleted
|
||||
rw_lock_read_unlock(&sCacheListLock);
|
||||
rw_lock_read_lock(&sCacheListLock);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user