mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-09 17:49:45 +00:00
cellSysCache: Global hdd1 lock
Take advantage of recursive locking.
This commit is contained in:
parent
7b3c0a69f3
commit
183aa31319
1 changed files with 3 additions and 2 deletions
|
@ -79,8 +79,6 @@ struct syscache_info
|
||||||
// Poison opened files in /dev_hdd1 to return CELL_EIO on access
|
// Poison opened files in /dev_hdd1 to return CELL_EIO on access
|
||||||
if (remove_root)
|
if (remove_root)
|
||||||
{
|
{
|
||||||
std::lock_guard lock(g_mp_sys_dev_hdd1.mutex);
|
|
||||||
|
|
||||||
idm::select<lv2_fs_object, lv2_file>([](u32 id, lv2_file& file)
|
idm::select<lv2_fs_object, lv2_file>([](u32 id, lv2_file& file)
|
||||||
{
|
{
|
||||||
if (std::memcmp("/dev_hdd1", file.name.data(), 9) == 0)
|
if (std::memcmp("/dev_hdd1", file.name.data(), 9) == 0)
|
||||||
|
@ -108,6 +106,7 @@ error_code cellSysCacheClear()
|
||||||
// Clear existing cache
|
// Clear existing cache
|
||||||
if (!cache->cache_id.empty())
|
if (!cache->cache_id.empty())
|
||||||
{
|
{
|
||||||
|
std::lock_guard lock0(g_mp_sys_dev_hdd1.mutex);
|
||||||
cache->clear(false);
|
cache->clear(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,6 +148,8 @@ error_code cellSysCacheMount(vm::ptr<CellSysCacheParam> param)
|
||||||
return not_an_error(CELL_SYSCACHE_RET_OK_RELAYED);
|
return not_an_error(CELL_SYSCACHE_RET_OK_RELAYED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::lock_guard lock0(g_mp_sys_dev_hdd1.mutex);
|
||||||
|
|
||||||
// Clear existing cache
|
// Clear existing cache
|
||||||
if (!cache->cache_id.empty())
|
if (!cache->cache_id.empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue