diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-18 17:31:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-18 18:26:54 +0200 |
commit | c096cb9352705f1aebcab72e9ce1a06136083921 (patch) | |
tree | 386f8558fe02355683037e079bd06cb45cc50843 /Kernel | |
parent | eeaba41d130eb6c677a12c8618833990470c2cde (diff) | |
download | serenity-c096cb9352705f1aebcab72e9ce1a06136083921.zip |
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.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/FileSystem/TmpFS.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<Inode> 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<size_t> TmpFSInode::directory_entry_count() const |