Kernel: Handle OOM of file system in sys$mount

This commit is contained in:
Brian Gianforcaro 2021-05-28 05:42:03 -07:00 committed by Linus Groh
commit 7c0b2eb0f5
Notes: sideshowbarker 2024-07-18 17:02:07 +09:00

View file

@ -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;