|
@@ -67,6 +67,9 @@ int Process::sys$mount(Userspace<const Syscall::SC_mount_params*> user_params)
|
|
|
|
|
|
auto& target_custody = custody_or_error.value();
|
|
|
|
|
|
+ if (!target_custody->inode().is_directory())
|
|
|
+ return -ENOTDIR;
|
|
|
+
|
|
|
if (params.flags & MS_REMOUNT) {
|
|
|
// We're not creating a new mount, we're updating an existing one!
|
|
|
return VFS::the().remount(target_custody, params.flags & ~MS_REMOUNT);
|