소스 검색

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);
     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