浏览代码

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.
Andreas Kling 5 年之前
父节点
当前提交
c096cb9352
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Kernel/FileSystem/TmpFS.cpp

+ 1 - 1
Kernel/FileSystem/TmpFS.cpp

@@ -218,7 +218,7 @@ RefPtr<Inode> TmpFSInode::lookup(StringView name)
     auto it = m_children.find(name);
     auto it = m_children.find(name);
     if (it == m_children.end())
     if (it == m_children.end())
         return {};
         return {};
-    return fs().get_inode(it->value.entry.inode);
+    return it->value.inode;
 }
 }
 
 
 KResultOr<size_t> TmpFSInode::directory_entry_count() const
 KResultOr<size_t> TmpFSInode::directory_entry_count() const