1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 01:27:42 +00:00

Kernel/SysFS: Remove redundant SysFS& member from SysFSInode

This commit is contained in:
Andreas Kling 2021-07-18 02:23:22 +02:00
parent d3cf4cd8f0
commit d298de5e09
2 changed files with 7 additions and 7 deletions

View file

@ -170,7 +170,6 @@ NonnullRefPtr<SysFSDirectoryInode> SysFSDirectoryInode::create(SysFS const& sysf
SysFSDirectoryInode::SysFSDirectoryInode(SysFS const& fs, SysFSComponent const& component)
: SysFSInode(fs, component)
, m_parent_fs(const_cast<SysFS&>(fs))
{
}
@ -192,17 +191,17 @@ InodeMetadata SysFSDirectoryInode::metadata() const
}
KResult SysFSDirectoryInode::traverse_as_directory(Function<bool(FileSystem::DirectoryEntryView const&)> callback) const
{
MutexLocker locker(m_parent_fs.m_lock);
return m_associated_component->traverse_as_directory(m_parent_fs.fsid(), move(callback));
MutexLocker locker(fs().m_lock);
return m_associated_component->traverse_as_directory(fs().fsid(), move(callback));
}
RefPtr<Inode> SysFSDirectoryInode::lookup(StringView name)
{
MutexLocker locker(m_parent_fs.m_lock);
MutexLocker locker(fs().m_lock);
auto component = m_associated_component->lookup(name);
if (!component)
return {};
return component->to_inode(m_parent_fs);
return component->to_inode(fs());
}
SysFSBusDirectory& SysFSComponentRegistry::buses_directory()