1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 04:17:34 +00:00

Kernel: Port mounts to reference inodes directly

...instead of going through their identifiers. See the previous commit for
reasoning.
This commit is contained in:
Sergey Bugaev 2020-06-25 00:16:24 +03:00 committed by Andreas Kling
parent df66c28479
commit 6efbbcd4ba
9 changed files with 64 additions and 45 deletions

View file

@ -716,10 +716,10 @@ Optional<KBuffer> procfs$mounts(InodeIdentifier)
VFS::the().for_each_mount([&builder](auto& mount) {
auto& fs = mount.guest_fs();
builder.appendf("%s @ ", fs.class_name());
if (!mount.host().is_valid())
if (mount.host() == nullptr)
builder.appendf("/");
else {
builder.appendf("%u:%u", mount.host().fsid(), mount.host().index());
builder.appendf("%u:%u", mount.host()->fsid(), mount.host()->index());
builder.append(' ');
builder.append(mount.absolute_path());
}