From 5d08665d9a415e69cf8c2bca087ece7e43087ab1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 17 Nov 2019 19:11:19 +0100 Subject: [PATCH] Ext2FS: Remove unnecessary extra cache lookup in get_inode() --- Kernel/FileSystem/Ext2FileSystem.cpp | 5 ----- 1 file changed, 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 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(*this), inode.index())); memcpy(&new_inode->m_raw_inode, reinterpret_cast(block + offset), sizeof(ext2_inode)); m_inode_cache.set(inode.index(), new_inode);