From 3012fa5dfe5dfed5e83baf9b40934ed8e8317627 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 3 Jul 2026 09:32:30 +0200 Subject: kernel: rearrange sources according to p1204 --- kernel/src/filesystem/mount.cpp | 90 ----------------------------------------- 1 file changed, 90 deletions(-) delete mode 100644 kernel/src/filesystem/mount.cpp (limited to 'kernel/src/filesystem/mount.cpp') diff --git a/kernel/src/filesystem/mount.cpp b/kernel/src/filesystem/mount.cpp deleted file mode 100644 index ead7479d..00000000 --- a/kernel/src/filesystem/mount.cpp +++ /dev/null @@ -1,90 +0,0 @@ -#include - -#include -#include - -#include - -#include -#include - -#include -#include - -namespace kernel::filesystem -{ - mount::mount(kstd::shared_ptr const & mount_dentry, kstd::shared_ptr const & root_dentry, - kstd::shared_ptr const & fs, kstd::shared_ptr const & parent_mount, - kstd::shared_ptr const & source_mount) - : m_mount_dentry(mount_dentry) - , m_root_dentry(root_dentry) - , m_filesystem(fs) - , m_parent_mount(parent_mount) - , m_source_mount(source_mount) - , m_ref_count(0) - { - if (!m_filesystem) - { - kapi::system::panic("[FILESYSTEM] mount initialized with null filesystem."); - } - } - - auto mount::mount_dentry() const -> kstd::shared_ptr const & - { - return m_mount_dentry; - } - - auto mount::get_filesystem() const -> kstd::shared_ptr const & - { - return m_filesystem; - } - - auto mount::root_dentry() const -> kstd::shared_ptr const & - { - return m_root_dentry; - } - - auto mount::mount_path() const -> kstd::string - { - if (m_mount_dentry) - { - return m_mount_dentry->absolute_path(); - } - return "/"; - } - - auto mount::parent_mount() const -> kstd::shared_ptr const & - { - return m_parent_mount; - } - - auto mount::source_mount() const -> kstd::shared_ptr - { - return m_source_mount.lock(); - } - - auto mount::increment_ref_count() -> void - { - m_ref_count += 1; - } - - auto mount::decrement_ref_count() -> void - { - if (m_ref_count == 0) - { - kapi::system::panic("[FILESYSTEM] decrement_ref_count() was called but ref_count is 0"); - } - - m_ref_count -= 1; - } - - auto mount::is_ready_to_unmount() const -> bool - { - return m_ref_count == 0; - } - - auto mount::ref_count() const -> size_t - { - return m_ref_count; - } -} // namespace kernel::filesystem \ No newline at end of file -- cgit v1.2.3