summaryrefslogtreecommitdiff
path: root/fs/pnode.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-25 09:20:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-25 09:20:17 +0200
commit5b9057cfafaaabc3c91a4e3e3bec024651737e66 (patch)
tree01ea4e7ac0d3303cd3dcb4ad63884cd67b577e0e /fs/pnode.c
parent73c94172e278197fbed9f6a7b7550edc5bc1fbad (diff)
parent1b237f190eb3d36f52dffe07a40b5eb210280e00 (diff)
Merge 6.17-rc3 into char-misc-next
We need the char/misc/iio fixes in here as well to build on. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/pnode.c')
-rw-r--r--fs/pnode.c10
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