summaryrefslogtreecommitdiff
path: root/fs/pnode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-06-17 21:35:22 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-06-29 19:03:37 -0400
commit663206854f020ec6fc6bfd3d52f501a28ede1403 (patch)
tree5d091baf6393554ab406892c1c184f984e7899a2 /fs/pnode.c
parentdd5a4e1d640bf3542c4583491e6b91d25de3b760 (diff)
downloadlinux-663206854f020ec6fc6bfd3d52f501a28ede1403.tar.gz
linux-663206854f020ec6fc6bfd3d52f501a28ede1403.tar.bz2
linux-663206854f020ec6fc6bfd3d52f501a28ede1403.zip
copy_tree(): don't link the mounts via mnt_list
The only place that really needs to be adjusted is commit_tree() - there we need to iterate through the copy and we might as well use next_mnt() for that. However, in case when our tree has been slid under something already mounted (propagation to a mountpoint that already has something mounted on it or a 'beneath' move_mount) we need to take care not to walk into the overmounting tree. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/pnode.c')
-rw-r--r--fs/pnode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/pnode.c b/fs/pnode.c
index cbf5f5746252..81f7599bdac4 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -449,7 +449,8 @@ static void umount_one(struct mount *m, struct list_head *to_umount)
{
m->mnt.mnt_flags |= MNT_UMOUNT;
list_del_init(&m->mnt_child);
- move_from_ns(m, to_umount);
+ move_from_ns(m);
+ list_add_tail(&m->mnt_list, to_umount);
}
static void remove_from_candidate_list(struct mount *m)