aboutsummaryrefslogtreecommitdiff
path: root/kernel/kernel/vfs/mount_table.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kernel/vfs/mount_table.cpp')
-rw-r--r--kernel/kernel/vfs/mount_table.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/kernel/vfs/mount_table.cpp b/kernel/kernel/vfs/mount_table.cpp
index 01127697..43dff516 100644
--- a/kernel/kernel/vfs/mount_table.cpp
+++ b/kernel/kernel/vfs/mount_table.cpp
@@ -83,6 +83,16 @@ namespace kernel::vfs
return (mount_it != m_mounts.end()) ? *mount_it : nullptr;
}
+ auto mount_table::move_mount(kstd::shared_ptr<mount> const & mount, kstd::shared_ptr<dentry> const & mount_point,
+ kstd::shared_ptr<struct mount> const & parent) -> void
+ {
+ mount->mount_dentry()->unset_flag(dentry::dentry_flags::is_mount_point);
+ mount->root_dentry()->set_parent(mount_point->parent());
+ mount->set_mount_dentry(mount_point);
+ mount->set_parent_mount(parent);
+ mount_point->set_flag(dentry::dentry_flags::is_mount_point);
+ }
+
auto mount_table::find_mount_iterator(std::string_view path) const
-> kstd::vector<kstd::shared_ptr<mount>>::const_iterator
{