diff options
author | Christian Brauner <brauner@kernel.org> | 2025-09-17 12:01:05 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-09-19 14:26:14 +0200 |
commit | 7914f15c5e45ea6c76f2b3272ff39d8fe67b13f5 (patch) | |
tree | 32385a82110d012928536d7787b024add8818f63 /fs/pnode.c | |
parent | 885fc8ac0a4dc70f5d87b80b0977292870e35c60 (diff) | |
parent | 38f4885088fc5ad41b8b0a2a2cfc73d01e709e5c (diff) |
Merge branch 'no-rebase-mnt_ns_tree_remove'
Bring in the fix for removing a mount namespace from the mount namespace
rbtree and list.
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/pnode.c')
-rw-r--r-- | fs/pnode.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/pnode.c b/fs/pnode.c index 81f7599bdac4..6f7d02f3fa98 100644 --- a/fs/pnode.c +++ b/fs/pnode.c @@ -111,7 +111,8 @@ void change_mnt_propagation(struct mount *mnt, int type) return; } if (IS_MNT_SHARED(mnt)) { - m = propagation_source(mnt); + if (type == MS_SLAVE || !hlist_empty(&mnt->mnt_slave_list)) + m = propagation_source(mnt); if (list_empty(&mnt->mnt_share)) { mnt_release_group_id(mnt); } else { @@ -637,10 +638,11 @@ void propagate_umount(struct list_head *set) } // now to_umount consists of all acceptable candidates - // deal with reparenting of remaining overmounts on those + // deal with reparenting of surviving overmounts on those list_for_each_entry(m, &to_umount, mnt_list) { - if (m->overmount) - reparent(m->overmount); + struct mount *over = m->overmount; + if (over && !will_be_unmounted(over)) + reparent(over); } // and fold them into the set |