mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 14:25:06 +00:00
Kernel: Handle OOM of file system in sys$mount
This commit is contained in:
parent
cbe1e05771
commit
7c0b2eb0f5
1 changed files with 3 additions and 0 deletions
|
@ -95,6 +95,9 @@ KResultOr<int> Process::sys$mount(Userspace<const Syscall::SC_mount_params*> use
|
|||
return ENODEV;
|
||||
}
|
||||
|
||||
if (!fs)
|
||||
return ENOMEM;
|
||||
|
||||
if (!fs->initialize()) {
|
||||
dbgln("mount: failed to initialize {} filesystem, fd={}", fs_type, source_fd);
|
||||
return ENODEV;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue