aboutsummaryrefslogtreecommitdiff
path: root/kernel/src/filesystem/mount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/filesystem/mount.cpp')
-rw-r--r--kernel/src/filesystem/mount.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/src/filesystem/mount.cpp b/kernel/src/filesystem/mount.cpp
index f9e709c..d165385 100644
--- a/kernel/src/filesystem/mount.cpp
+++ b/kernel/src/filesystem/mount.cpp
@@ -13,11 +13,13 @@
namespace kernel::filesystem
{
mount::mount(kstd::shared_ptr<dentry> const & mount_dentry, kstd::shared_ptr<dentry> const & root_dentry,
- kstd::shared_ptr<filesystem> const & fs, std::string_view mount_path)
+ kstd::shared_ptr<filesystem> const & fs, std::string_view mount_path,
+ kstd::shared_ptr<mount> const & parent_mount)
: m_mount_path(mount_path)
, m_mount_dentry(mount_dentry)
, m_root_dentry(root_dentry)
, m_filesystem(fs)
+ , m_parent_mount(parent_mount)
{
if (!m_filesystem)
{
@@ -25,7 +27,7 @@ namespace kernel::filesystem
}
}
- auto mount::get_mount_dentry() const -> kstd::shared_ptr<dentry>
+ auto mount::get_mount_dentry() const -> kstd::shared_ptr<dentry> const &
{
return m_mount_dentry;
}
@@ -44,4 +46,9 @@ namespace kernel::filesystem
{
return m_mount_path.view();
}
+
+ auto mount::get_parent_mount() const -> kstd::shared_ptr<mount> const &
+ {
+ return m_parent_mount;
+ }
} // namespace kernel::filesystem \ No newline at end of file