From c096cb9352705f1aebcab72e9ce1a06136083921 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 18 Aug 2020 17:31:18 +0200 Subject: [PATCH] TmpFS: Avoid unnecessary inode lookup in TmpFSInode::lookup() We don't have to ask the VFS to find our child inode, we have a pointer to it right here. --- Kernel/FileSystem/TmpFS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/FileSystem/TmpFS.cpp b/Kernel/FileSystem/TmpFS.cpp index c505c1cf39..0b43302315 100644 --- a/Kernel/FileSystem/TmpFS.cpp +++ b/Kernel/FileSystem/TmpFS.cpp @@ -218,7 +218,7 @@ RefPtr TmpFSInode::lookup(StringView name) auto it = m_children.find(name); if (it == m_children.end()) return {}; - return fs().get_inode(it->value.entry.inode); + return it->value.inode; } KResultOr TmpFSInode::directory_entry_count() const