1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-12 02:30:30 +09:00

Kernel: Properly propagate bind mount flags

Previously, when performing a bind mount flags other than MS_BIND were ignored.
Now, they're properly propagated the same way a for any other mount.
This commit is contained in:
Sergey Bugaev 2020-01-12 19:22:24 +03:00 committed by Andreas Kling
parent b620ed25ab
commit 93ff911473
Notes: sideshowbarker 2024-07-19 10:07:24 +09:00
3 changed files with 7 additions and 7 deletions

View file

@ -49,11 +49,11 @@ KResult VFS::mount(FS& file_system, Custody& mount_point, int flags)
return KSuccess;
}
KResult VFS::bind_mount(Custody& source, Custody& mount_point)
KResult VFS::bind_mount(Custody& source, Custody& mount_point, int flags)
{
dbg() << "VFS: Bind-mounting " << source.absolute_path() << " at " << mount_point.absolute_path();
// FIXME: check that this is not already a mount point
Mount mount { source.inode(), mount_point };
Mount mount { source.inode(), mount_point, flags };
m_mounts.append(move(mount));
mount_point.did_mount_on({});
return KSuccess;
@ -631,11 +631,11 @@ VFS::Mount::Mount(FS& guest_fs, Custody* host_custody, int flags)
{
}
VFS::Mount::Mount(Inode& source, Custody& host_custody)
VFS::Mount::Mount(Inode& source, Custody& host_custody, int flags)
: m_guest(source.identifier())
, m_guest_fs(source.fs())
, m_host_custody(host_custody)
, m_flags(MS_BIND)
, m_flags(flags)
{
}