get rid of mnt_set_mountpoint_beneath()
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 26 Apr 2025 02:18:12 +0000 (22:18 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 29 Jun 2025 22:13:41 +0000 (18:13 -0400)
commit431cc1d8e2dab751b2b8f298a6d9caf83d8b49c3
tree6953c7b6b6ced4442bcbc7cf8c349b29424672ea
parent8c6ce8e86dd75db8e6c6a3e5a870e8d52dbab2d0
get rid of mnt_set_mountpoint_beneath()

mnt_set_mountpoint_beneath() consists of attaching new mount side-by-side
with the one we want to mount beneath (by mnt_set_mountpoint()), followed
by mnt_change_mountpoint() shifting the the top mount onto the new one
(by mnt_change_mountpoint()).

Both callers of mnt_set_mountpoint_beneath (both in attach_recursive_mnt())
have the same form - in 'beneath' case we call mnt_set_mountpoint_beneath(),
otherwise - mnt_set_mountpoint().

The thing is, expressing that as unconditional mnt_set_mountpoint(),
followed, in 'beneath' case, by mnt_change_mountpoint() is just as easy.
And these mnt_change_mountpoint() callers are similar to the ones we
do when it comes to attaching propagated copies, which will allow more
cleanups in the next commits.

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