Kernel: Append root filesystem to the VFS FileBackedFileSystem list

This commit is contained in:
Liav A 2022-08-20 00:11:59 +03:00 committed by Andrew Kaster
parent 0fd7b688af
commit 24977996a6
Notes: sideshowbarker 2024-07-17 05:12:46 +09:00

View File

@ -157,6 +157,12 @@ ErrorOr<void> VirtualFileSystem::mount_root(FileSystem& fs)
auto pseudo_path = TRY(static_cast<FileBackedFileSystem&>(fs).file_description().pseudo_path());
dmesgln("VirtualFileSystem: mounted root({}) from {} ({})", fs.fsid(), fs.class_name(), pseudo_path);
if (fs.is_file_backed()) {
m_file_backed_file_systems_list.with([&](auto& list) {
list.append(static_cast<FileBackedFileSystem&>(fs));
});
}
// Note: Actually add a mount for the filesystem and increment the filesystem mounted count
m_mounts.with([&](auto& mounts) {
new_mount->guest_fs().mounted_count({}).with([&](auto& mounted_count) {