VFS: Fix recursive locking

This commit is contained in:
Eladash 2023-10-03 04:43:39 +03:00 committed by Elad Ashkenazi
parent 4b827a8d9c
commit ce3d7f90fd
3 changed files with 15 additions and 10 deletions

View file

@ -69,10 +69,10 @@ struct syscache_info
}
}
void clear(bool remove_root) const noexcept
void clear(bool remove_root, bool lock = false) const noexcept
{
// Clear cache
if (!vfs::host::remove_all(cache_root + cache_id, cache_root, &g_mp_sys_dev_hdd1, remove_root))
if (!vfs::host::remove_all(cache_root + cache_id, cache_root, &g_mp_sys_dev_hdd1, remove_root, lock))
{
cellSysutil.fatal("cellSysCache: failed to clear cache directory '%s%s' (%s)", cache_root, cache_id, fs::g_tls_error);
}