summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/Ext2FileSystem.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-11-17 19:11:19 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-11-17 19:11:19 +0100
commit5d08665d9a415e69cf8c2bca087ece7e43087ab1 (patch)
treeddfc5e9722e5fec8a7efbdd398689443c6cd8a46 /Kernel/FileSystem/Ext2FileSystem.cpp
parentba997c0a72a07c3590d7f00b5045865ddd121136 (diff)
downloadserenity-5d08665d9a415e69cf8c2bca087ece7e43087ab1.zip
Ext2FS: Remove unnecessary extra cache lookup in get_inode()
Diffstat (limited to 'Kernel/FileSystem/Ext2FileSystem.cpp')
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index 374f7c79b9..9ec3b29139 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -595,11 +595,6 @@ RefPtr<Inode> Ext2FS::get_inode(InodeIdentifier inode) const
if (!read_block_containing_inode(inode.index(), block_index, offset, block))
return {};
- // FIXME: Do we really need to check the cache once again?
- // We've been holding m_lock this whole time.
- auto it = m_inode_cache.find(inode.index());
- if (it != m_inode_cache.end())
- return (*it).value;
auto new_inode = adopt(*new Ext2FSInode(const_cast<Ext2FS&>(*this), inode.index()));
memcpy(&new_inode->m_raw_inode, reinterpret_cast<ext2_inode*>(block + offset), sizeof(ext2_inode));
m_inode_cache.set(inode.index(), new_inode);