copy_tree(): don't link the mounts via mnt_list
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 18 Jun 2025 01:35:22 +0000 (21:35 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 29 Jun 2025 23:03:37 +0000 (19:03 -0400)
commit663206854f020ec6fc6bfd3d52f501a28ede1403
tree5d091baf6393554ab406892c1c184f984e7899a2
parentdd5a4e1d640bf3542c4583491e6b91d25de3b760
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>
fs/mount.h
fs/namespace.c
fs/pnode.c