1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:27:35 +00:00

Kernel/VFS: Remove the find_mount_for_guest method

We don't really need this method anymore, because we could just try to
find the mount entry based on the given mount point host custody.

This also allows us to remove the is_vfs_root and root_inode_id methods
from the VirtualFileSystem class.
This commit is contained in:
Liav A 2023-08-04 22:34:58 +03:00 committed by Jelle Raaijmakers
parent e5c7662638
commit d216f780a4
2 changed files with 2 additions and 29 deletions

View file

@ -88,8 +88,6 @@ public:
ErrorOr<void> for_each_mount(Function<ErrorOr<void>(Mount const&)>) const;
InodeIdentifier root_inode_id() const;
void sync_filesystems();
void lock_all_filesystems();
@ -111,16 +109,13 @@ private:
ErrorOr<void> add_file_system_to_mount_table(FileSystem& file_system, Custody& mount_point, int flags);
bool is_vfs_root(InodeIdentifier) const;
ErrorOr<void> traverse_directory_inode(Inode&, Function<ErrorOr<void>(FileSystem::DirectoryEntryView const&)>);
static bool check_matching_absolute_path_hierarchy(Custody const& first_custody, Custody const& second_custody);
bool mount_point_exists_at_custody(Custody& mount_point);
// FIXME: These functions are totally unsafe as someone could unmount the returned Mount underneath us.
// FIXME: This function is totally unsafe as someone could unmount the returned Mount underneath us.
Mount* find_mount_for_host_custody(Custody const& current_custody);
Mount* find_mount_for_guest(InodeIdentifier);
RefPtr<Inode> m_root_inode;