From 05efdfeee4efd8fc28d42f441fd04f7c59227fad Mon Sep 17 00:00:00 2001 From: LoveSy Date: Thu, 1 Feb 2024 22:38:11 +0800 Subject: [PATCH] Recursive bind mount --- userspace/ksud/src/mount.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/userspace/ksud/src/mount.rs b/userspace/ksud/src/mount.rs index 0ebe88667e62..6dd326c159cc 100644 --- a/userspace/ksud/src/mount.rs +++ b/userspace/ksud/src/mount.rs @@ -152,7 +152,9 @@ fn bind_mount(from: impl AsRef, to: impl AsRef) -> Result<()> { let tree = open_tree( CWD, from.as_ref(), - OpenTreeFlags::OPEN_TREE_CLOEXEC | OpenTreeFlags::OPEN_TREE_CLONE, + OpenTreeFlags::OPEN_TREE_CLOEXEC + | OpenTreeFlags::OPEN_TREE_CLONE + | OpenTreeFlags::AT_RECURSIVE, )?; move_mount( tree.as_fd(),