summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/FileBackedFileSystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/FileSystem/FileBackedFileSystem.h')
-rw-r--r--Kernel/FileSystem/FileBackedFileSystem.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/Kernel/FileSystem/FileBackedFileSystem.h b/Kernel/FileSystem/FileBackedFileSystem.h
index e959bb729c..8bfb1a1b6f 100644
--- a/Kernel/FileSystem/FileBackedFileSystem.h
+++ b/Kernel/FileSystem/FileBackedFileSystem.h
@@ -12,6 +12,8 @@
namespace Kernel {
class FileBackedFileSystem : public FileSystem {
+ friend class VirtualFileSystem;
+
public:
virtual ~FileBackedFileSystem() override;
@@ -23,10 +25,19 @@ public:
protected:
explicit FileBackedFileSystem(OpenFileDescription&);
+ // Note: We require all FileBackedFileSystem to implement something that actually
+ // takes into account the fact that we will clean the last mount of the filesystem,
+ // therefore, removing the file system with it from the Kernel memory.
+ virtual ErrorOr<void> prepare_to_clear_last_mount() override = 0;
+
+ virtual ErrorOr<void> initialize_while_locked() = 0;
+ virtual bool is_initialized_while_locked() = 0;
+
private:
+ virtual ErrorOr<void> initialize() override final;
virtual bool is_file_backed() const override { return true; }
+ IntrusiveListNode<FileBackedFileSystem> m_file_backed_file_system_node;
mutable NonnullLockRefPtr<OpenFileDescription> m_file_description;
};
-
}