mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +00:00
Revert "Kernel: Return -ENOTDIR for non-directory mount target"
This reverts commit b7b09470ca
.
Mounting a file on top of a file is a valid thing we support.
This commit is contained in:
parent
dc17e01c99
commit
90343eeaeb
2 changed files with 0 additions and 4 deletions
|
@ -89,7 +89,6 @@ launch the initial userspace process.
|
||||||
* `EBADF`: If the `source_fd` is not valid, and either `fs_type` specifies a
|
* `EBADF`: If the `source_fd` is not valid, and either `fs_type` specifies a
|
||||||
file-backed filesystem (and not a pseudo filesystem), or `MS_BIND` is
|
file-backed filesystem (and not a pseudo filesystem), or `MS_BIND` is
|
||||||
specified in flags.
|
specified in flags.
|
||||||
* `ENOTDIR`: If `target` is not a directory.
|
|
||||||
* `ENOTBLK`: If the `source_fd` is not a block device, but one is required (i.e.
|
* `ENOTBLK`: If the `source_fd` is not a block device, but one is required (i.e.
|
||||||
when `fs_type` is `Ext2FS`)
|
when `fs_type` is `Ext2FS`)
|
||||||
|
|
||||||
|
|
|
@ -67,9 +67,6 @@ int Process::sys$mount(Userspace<const Syscall::SC_mount_params*> user_params)
|
||||||
|
|
||||||
auto& target_custody = custody_or_error.value();
|
auto& target_custody = custody_or_error.value();
|
||||||
|
|
||||||
if (!target_custody->inode().is_directory())
|
|
||||||
return -ENOTDIR;
|
|
||||||
|
|
||||||
if (params.flags & MS_REMOUNT) {
|
if (params.flags & MS_REMOUNT) {
|
||||||
// We're not creating a new mount, we're updating an existing one!
|
// We're not creating a new mount, we're updating an existing one!
|
||||||
return VFS::the().remount(target_custody, params.flags & ~MS_REMOUNT);
|
return VFS::the().remount(target_custody, params.flags & ~MS_REMOUNT);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue