diff --git a/rpcs3/Emu/Cell/lv2/sys_fs.cpp b/rpcs3/Emu/Cell/lv2/sys_fs.cpp index b2f8d187f0..acc04fd45a 100644 --- a/rpcs3/Emu/Cell/lv2/sys_fs.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_fs.cpp @@ -3125,6 +3125,7 @@ error_code sys_fs_lsn_lock(ppu_thread&, u32 fd) return CELL_OK; } + std::lock_guard lock(file->mp->mutex); file->lock.compare_and_swap(0, 1); return CELL_OK; } @@ -3140,7 +3141,14 @@ error_code sys_fs_lsn_unlock(ppu_thread&, u32 fd) return CELL_EBADF; } + // See sys_fs_lsn_lock + if (file->mp == &g_mp_sys_dev_hdd0 || file->mp->flags & lv2_mp_flag::strict_get_block_size) + { + return CELL_OK; + } + // Unlock unconditionally + std::lock_guard lock(file->mp->mutex); file->lock.compare_and_swap(1, 0); return CELL_OK; }