From 2e5a9b4fab88847863dfa7bdbb0168075fd801d7 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Sat, 29 Jan 2022 20:22:02 +0200 Subject: [PATCH] Kernel: Use HashCompatible HashMap lookups instead of specifying a hash --- Kernel/FileSystem/Ext2FileSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp index 0a68dab23a..8d1e320ceb 100644 --- a/Kernel/FileSystem/Ext2FileSystem.cpp +++ b/Kernel/FileSystem/Ext2FileSystem.cpp @@ -1169,7 +1169,7 @@ ErrorOr Ext2FSInode::remove_child(StringView name) TRY(populate_lookup_cache()); - auto it = m_lookup_cache.find(name.hash(), [&](auto& entry) { return entry.key->view() == name; }); + auto it = m_lookup_cache.find(name); if (it == m_lookup_cache.end()) return ENOENT; auto child_inode_index = (*it).value; @@ -1531,7 +1531,7 @@ ErrorOr> Ext2FSInode::lookup(StringView name) InodeIndex inode_index; { MutexLocker locker(m_inode_lock); - auto it = m_lookup_cache.find(name.hash(), [&](auto& entry) { return entry.key->view() == name; }); + auto it = m_lookup_cache.find(name); if (it == m_lookup_cache.end()) { dbgln_if(EXT2_DEBUG, "Ext2FSInode[{}]:lookup(): '{}' not found", identifier(), name); return ENOENT;