mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 08:56:40 +00:00
Kernel: Use HashCompatible HashMap lookups instead of specifying a hash
This commit is contained in:
parent
c68609b27f
commit
2e5a9b4fab
|
@ -1169,7 +1169,7 @@ ErrorOr<void> 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<NonnullRefPtr<Inode>> 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;
|
||||
|
|
Loading…
Reference in a new issue