1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:08:11 +00:00

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.
This commit is contained in:
Andreas Kling 2020-08-18 17:31:18 +02:00
parent eeaba41d13
commit c096cb9352

View file

@ -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