mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
FileSystem: Don't create a temporary FileDescriptor every time we stat().
Instead, move the stat buffer population into InodeMetadata so we can call it directly from VFS::stat() once we have an Inode.
This commit is contained in:
parent
bba2c062fe
commit
00de8b9fc4
Notes:
sideshowbarker
2024-07-19 13:48:11 +09:00
Author: https://github.com/awesomekling
Commit: 00de8b9fc4
4 changed files with 30 additions and 29 deletions
|
@ -146,7 +146,7 @@ KResult VFS::stat(StringView path, int options, Custody& base, struct stat& stat
|
|||
auto custody_or_error = resolve_path(path, base, nullptr, options);
|
||||
if (custody_or_error.is_error())
|
||||
return custody_or_error.error();
|
||||
return FileDescriptor::create(custody_or_error.value().ptr())->fstat(statbuf);
|
||||
return custody_or_error.value()->inode().metadata().stat(statbuf);
|
||||
}
|
||||
|
||||
KResultOr<Retained<FileDescriptor>> VFS::open(StringView path, int options, mode_t mode, Custody& base)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue