mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +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:
parent
df66c28479
commit
6efbbcd4ba
9 changed files with 64 additions and 45 deletions
|
@ -4309,12 +4309,12 @@ int Process::sys$umount(const char* user_mountpoint, size_t mountpoint_length)
|
|||
if (mountpoint.is_error())
|
||||
return mountpoint.error();
|
||||
|
||||
auto metadata_or_error = VFS::the().lookup_metadata(mountpoint.value(), current_directory());
|
||||
if (metadata_or_error.is_error())
|
||||
return metadata_or_error.error();
|
||||
auto custody_or_error = VFS::the().resolve_path(mountpoint.value(), current_directory());
|
||||
if (custody_or_error.is_error())
|
||||
return custody_or_error.error();
|
||||
|
||||
auto guest_inode_id = metadata_or_error.value().inode;
|
||||
return VFS::the().unmount(guest_inode_id);
|
||||
auto& guest_inode = custody_or_error.value()->inode();
|
||||
return VFS::the().unmount(guest_inode);
|
||||
}
|
||||
|
||||
void Process::FileDescriptionAndFlags::clear()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue