summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/SysFS.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-18 02:23:22 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-18 02:23:22 +0200
commitd298de5e09ad37b1616d493df90f5c2d7e4c4bff (patch)
treee01a963c47e97e9a47b8c5b20a70079b1daf873e /Kernel/FileSystem/SysFS.cpp
parentd3cf4cd8f021393a8f95cea39c234013da758a2c (diff)
downloadserenity-d298de5e09ad37b1616d493df90f5c2d7e4c4bff.zip
Kernel/SysFS: Remove redundant SysFS& member from SysFSInode
Diffstat (limited to 'Kernel/FileSystem/SysFS.cpp')
-rw-r--r--Kernel/FileSystem/SysFS.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/Kernel/FileSystem/SysFS.cpp b/Kernel/FileSystem/SysFS.cpp
index 40c33ff7d2..af0328b967 100644
--- a/Kernel/FileSystem/SysFS.cpp
+++ b/Kernel/FileSystem/SysFS.cpp
@@ -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()