mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02: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:
Notes:
sideshowbarker
2024-07-18 21:54:16 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c7c63727bfe
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user