1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:45:07 +00:00

Ext2FS: Remove unnecessary locking in find_block_containing_inode()

This is just a bunch of index math based on immutable values in the
super block and block group descriptor. No need to lock here!
This commit is contained in:
Andreas Kling 2021-02-26 17:22:28 +01:00
parent 81e3ea29c3
commit c7c63727bf

View file

@ -180,7 +180,6 @@ NonnullRefPtr<Inode> Ext2FS::root_inode() const
bool Ext2FS::find_block_containing_inode(InodeIndex inode, BlockIndex& block_index, unsigned& offset) const
{
LOCKER(m_lock);
auto& super_block = this->super_block();
if (inode != EXT2_ROOT_INO && inode < EXT2_FIRST_INO(&super_block))