mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 14:58:46 +00:00
Refactor FS::find_parent_of_inode() into Inode::parent().
This way, Ext2FSInode can cache its parent inode index. This makes absolute path lookups dramatically faster. SynthFSInode is also simplified greatly.
This commit is contained in:
parent
7731aef7b2
commit
0d36281162
Notes:
sideshowbarker
2024-07-19 16:06:06 +09:00
Author: https://github.com/awesomekling
Commit: 0d36281162
6 changed files with 28 additions and 21 deletions
|
@ -346,7 +346,7 @@ String VFS::absolute_path(Inode& core_inode)
|
|||
if (inode->is_directory()) {
|
||||
parent_id = resolve_path("..", inode->identifier(), error);
|
||||
} else {
|
||||
parent_id = inode->fs().find_parent_of_inode(inode->identifier());
|
||||
parent_id = inode->parent()->identifier();
|
||||
}
|
||||
ASSERT(parent_id.is_valid());
|
||||
inode = get_inode(parent_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue