Fix a bug of bind mount

This commit is contained in:
Chen Chengjun 2025-12-03 05:09:12 +00:00 committed by Jianfeng Jiang
parent 6a87dad817
commit 34ebccb2e9
1 changed files with 1 additions and 1 deletions

View File

@ -326,7 +326,7 @@ impl Mount {
let old_children = old_mount.children.read();
for old_child_mount in old_children.values() {
let mountpoint = old_child_mount.mountpoint().unwrap();
if !mountpoint.is_equal_or_descendant_of(old_mount.root_dentry()) {
if !mountpoint.is_equal_or_descendant_of(new_parent_mount.root_dentry()) {
continue;
}
let new_child_mount =