diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2020-01-11 18:05:24 +0300 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2020-01-11 18:57:53 +0100 |
commit | 1e6ab0ed225eaa8585100526ce52f63914e4564d (patch) | |
tree | a952b873722c95b4d1b3713144efaa6ff3b3fdc0 /Kernel/FileSystem/VirtualFileSystem.h | |
parent | 4d77cdf9a805208c6f9993c657ae6c5a41a78372 (diff) | |
download | serenity-1e6ab0ed225eaa8585100526ce52f63914e4564d.zip |
Kernel: Simplify VFS::Mount handling
No need to pass around RefPtr<>s and NonnullRefPtr<>s and no need to
heap-allocate them.
Also remove VFS::mount(NonnullRefPtr<FS>&&, StringView path) - it has been
unused for a long time.
Diffstat (limited to 'Kernel/FileSystem/VirtualFileSystem.h')
-rw-r--r-- | Kernel/FileSystem/VirtualFileSystem.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Kernel/FileSystem/VirtualFileSystem.h b/Kernel/FileSystem/VirtualFileSystem.h index 2e8f92866d..38b5b54b4b 100644 --- a/Kernel/FileSystem/VirtualFileSystem.h +++ b/Kernel/FileSystem/VirtualFileSystem.h @@ -41,7 +41,7 @@ class VFS { public: class Mount { public: - Mount(RefPtr<Custody>&&, NonnullRefPtr<FS>&&); + Mount(FS&, Custody* host_custody); InodeIdentifier host() const; InodeIdentifier guest() const { return m_guest; } @@ -62,9 +62,8 @@ public: VFS(); ~VFS(); - bool mount_root(NonnullRefPtr<FS>&&); - KResult mount(NonnullRefPtr<FS>&&, StringView path); - KResult mount(NonnullRefPtr<FS>&&, Custody& mount_point); + bool mount_root(FS&); + KResult mount(FS&, Custody& mount_point); KResult unmount(InodeIdentifier guest_inode_id); KResultOr<NonnullRefPtr<FileDescription>> open(StringView path, int options, mode_t mode, Custody& base, Optional<UidAndGid> = {}); @@ -110,7 +109,7 @@ private: Lock m_lock { "VFSLock" }; RefPtr<Inode> m_root_inode; - NonnullOwnPtrVector<Mount> m_mounts; + Vector<Mount> m_mounts; RefPtr<Custody> m_root_custody; }; |