Skip to content

Commit

Permalink
ksud: Fix bind mount failed
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Feb 1, 2024
1 parent d4826bc commit aca505c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion userspace/ksud/src/mount.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ fn bind_mount(from: impl AsRef<Path>, to: impl AsRef<Path>) -> Result<()> {
from.as_ref(),
OpenTreeFlags::OPEN_TREE_CLOEXEC | OpenTreeFlags::OPEN_TREE_CLONE,
)?;
move_mount(tree.as_fd(), "", CWD, to.as_ref(), MoveMountFlags::empty())?;
move_mount(
tree.as_fd(),
"",
CWD,
to.as_ref(),
MoveMountFlags::MOVE_MOUNT_F_EMPTY_PATH,
)?;
Ok(())
}

Expand Down

0 comments on commit aca505c

Please sign in to comment.