1
Fork 0
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:
Brian Gianforcaro 2021-05-28 05:42:03 -07:00 committed by Linus Groh
parent cbe1e05771
commit 7c0b2eb0f5

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;