aboutsummaryrefslogtreecommitdiff
path: root/kernel/src/filesystem/mount_table.cpp
diff options
context:
space:
mode:
authorMarcel Braun <marcel.braun@ost.ch>2026-05-16 17:04:15 +0200
committerMarcel Braun <marcel.braun@ost.ch>2026-05-16 17:04:15 +0200
commit2ac578a90aaf5076f9b725b8a1a2c139075b9528 (patch)
treebb8bf76908079f53daa532486d8c003bed969894 /kernel/src/filesystem/mount_table.cpp
parent106e9731aaf856f940592c02953e49a496555822 (diff)
parent3d8ea5b1b833f39b77f0591fb2a301842ed5eb1c (diff)
downloadkernel-2ac578a90aaf5076f9b725b8a1a2c139075b9528.tar.xz
kernel-2ac578a90aaf5076f9b725b8a1a2c139075b9528.zip
Merge branch 'refactoring' into 'develop-BA-FS26'
refactoring See merge request teachos/kernel!38
Diffstat (limited to 'kernel/src/filesystem/mount_table.cpp')
-rw-r--r--kernel/src/filesystem/mount_table.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/kernel/src/filesystem/mount_table.cpp b/kernel/src/filesystem/mount_table.cpp
index 9951590..26828b4 100644
--- a/kernel/src/filesystem/mount_table.cpp
+++ b/kernel/src/filesystem/mount_table.cpp
@@ -14,15 +14,15 @@ namespace kernel::filesystem
{
auto mount_table::has_child_mounts(kstd::shared_ptr<mount> const & parent_mount) const -> bool
{
- return std::ranges::any_of(
- m_mounts, [&parent_mount](auto const & mount) { return mount->get_parent_mount() == parent_mount; });
+ return std::ranges::any_of(m_mounts,
+ [&parent_mount](auto const & mount) { return mount->parent_mount() == parent_mount; });
}
void mount_table::add_mount(kstd::shared_ptr<mount> const & mount)
{
m_mounts.push_back(mount);
- if (auto mount_dentry = mount->get_mount_dentry())
+ if (auto mount_dentry = mount->mount_dentry())
{
mount_dentry->set_flag(dentry::dentry_flags::is_mount_point);
}
@@ -46,7 +46,7 @@ namespace kernel::filesystem
return operation_result::has_child_mounts;
}
- mount->get_mount_dentry()->unset_flag(dentry::dentry_flags::is_mount_point);
+ mount->mount_dentry()->unset_flag(dentry::dentry_flags::is_mount_point);
m_mounts.erase(mount_it);
return operation_result::removed;
}
@@ -60,7 +60,6 @@ namespace kernel::filesystem
auto mount_table::find_mount_iterator(std::string_view path) const
-> kstd::vector<kstd::shared_ptr<mount>>::const_iterator
{
- return std::ranges::find_last_if(m_mounts, [&](auto const & mount) { return mount->get_mount_path() == path; })
- .begin();
+ return std::ranges::find_last_if(m_mounts, [&](auto const & mount) { return mount->mount_path() == path; }).begin();
}
} // namespace kernel::filesystem \ No newline at end of file