do_move_mount(): take dropping the old mountpoint into attach_recursive_mnt()
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 25 Apr 2025 16:55:39 +0000 (12:55 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 29 Jun 2025 22:13:42 +0000 (18:13 -0400)
commit761de25854424aa23fd1d7b2bef5c7d184690926
tree20a796f570c8a980f98bc5f2b0beb0419784afd8
parent86b1da96c5aeb816e4a1b60aa2b3bdcd87e28522
do_move_mount(): take dropping the old mountpoint into attach_recursive_mnt()

... and fold it with unhash_mnt() there - there's no need to retain a reference
to old_mp beyond that point, since by then all mountpoints we were going to add
are either explicitly pinned by get_mountpoint() or have stuff already added
to them.

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namespace.c