kernel/fs: Unlock the unused-vnodes lock before continue'ing.

Otherwise we'll unlock in the wrong order and trigger an "interrupts
disabled" assertion in this case.
This commit is contained in:
Augustin Cavalier
2024-12-10 13:53:06 -05:00
parent 81f187cbd9
commit f63a4a17ea
+3 -1
View File
@@ -1351,8 +1351,10 @@ free_unused_vnodes(int32 level)
// has been touched in the meantime, i.e. it is no longer the least
// recently used unused vnode and we rather don't free it.
unusedVnodesLocker.Lock();
if (vnode != sUnusedVnodeList.First())
if (vnode != sUnusedVnodeList.First()) {
unusedVnodesLocker.Unlock();
continue;
}
unusedVnodesLocker.Unlock();
ASSERT(!vnode->IsBusy());