mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +00:00
Remove InodeIdentifier::metadata().
This commit is contained in:
parent
3a0a8848fb
commit
951ed6692b
Notes:
sideshowbarker
2024-07-19 16:07:40 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/951ed6692bf
3 changed files with 6 additions and 14 deletions
|
@ -121,13 +121,6 @@ inline const FS* InodeIdentifier::fs() const
|
|||
return FS::from_fsid(m_fsid);
|
||||
}
|
||||
|
||||
inline InodeMetadata InodeIdentifier::metadata() const
|
||||
{
|
||||
if (!is_valid())
|
||||
return InodeMetadata();
|
||||
return fs()->inode_metadata(*this);
|
||||
}
|
||||
|
||||
inline bool InodeIdentifier::is_root_inode() const
|
||||
{
|
||||
return (*this) == fs()->root_inode();
|
||||
|
|
|
@ -33,7 +33,6 @@ public:
|
|||
return m_fsid != other.m_fsid || m_index != other.m_index;
|
||||
}
|
||||
|
||||
InodeMetadata metadata() const;
|
||||
bool is_root_inode() const;
|
||||
|
||||
ByteBuffer read_entire_file() const;
|
||||
|
|
|
@ -390,7 +390,9 @@ InodeIdentifier VFS::resolve_path(const String& path, InodeIdentifier base, int&
|
|||
auto& part = parts[i];
|
||||
if (part.is_empty())
|
||||
break;
|
||||
auto metadata = crumb_id.metadata();
|
||||
auto crumb_inode = get_inode(crumb_id);
|
||||
ASSERT(crumb_inode);
|
||||
auto metadata = crumb_inode->metadata();
|
||||
if (!metadata.isValid()) {
|
||||
#ifdef VFS_DEBUG
|
||||
kprintf("invalid metadata\n");
|
||||
|
@ -406,8 +408,7 @@ InodeIdentifier VFS::resolve_path(const String& path, InodeIdentifier base, int&
|
|||
return { };
|
||||
}
|
||||
auto parent = crumb_id;
|
||||
auto dir_inode = get_inode(crumb_id);
|
||||
crumb_id = dir_inode->lookup(part);
|
||||
crumb_id = crumb_inode->lookup(part);
|
||||
if (!crumb_id.is_valid()) {
|
||||
#ifdef VFS_DEBUG
|
||||
kprintf("child <%s>(%u) not found in directory, %02u:%08u\n", part.characters(), part.length(), parent.fsid(), parent.index());
|
||||
|
@ -432,7 +433,8 @@ InodeIdentifier VFS::resolve_path(const String& path, InodeIdentifier base, int&
|
|||
auto dir_inode = get_inode(mount->host());
|
||||
crumb_id = dir_inode->lookup("..");
|
||||
}
|
||||
metadata = crumb_id.metadata();
|
||||
crumb_inode = get_inode(crumb_id);
|
||||
metadata = crumb_inode->metadata();
|
||||
if (metadata.isDirectory()) {
|
||||
if (deepest_dir)
|
||||
*deepest_dir = crumb_id;
|
||||
|
@ -476,8 +478,6 @@ const InodeMetadata& Vnode::metadata() const
|
|||
{
|
||||
if (m_core_inode)
|
||||
return m_core_inode->metadata();
|
||||
if (!m_cachedMetadata.isValid())
|
||||
m_cachedMetadata = inode.metadata();
|
||||
return m_cachedMetadata;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue