aboutsummaryrefslogtreecommitdiff
path: root/kernel/src/filesystem/mount_table.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/filesystem/mount_table.cpp')
-rw-r--r--kernel/src/filesystem/mount_table.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/src/filesystem/mount_table.cpp b/kernel/src/filesystem/mount_table.cpp
index b582fd9..9951590 100644
--- a/kernel/src/filesystem/mount_table.cpp
+++ b/kernel/src/filesystem/mount_table.cpp
@@ -30,7 +30,6 @@ namespace kernel::filesystem
auto mount_table::remove_mount(std::string_view path) -> operation_result
{
- // TODO BA-FS26 check wheter something is open in this mount
auto mount_it = find_mount_iterator(path);
if (mount_it == m_mounts.end())
{
@@ -38,6 +37,10 @@ namespace kernel::filesystem
}
auto const & mount = *mount_it;
+ if (!mount->is_ready_to_unmount())
+ {
+ return operation_result::cannot_be_unmounted;
+ }
if (has_child_mounts(mount))
{
return operation_result::has_child_mounts;