]> Gentwo Git Trees - linux/.git/commit
move_mount(2): take sanity checks in 'beneath' case into do_lock_mount()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 20 Aug 2025 03:54:39 +0000 (23:54 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 2 Sep 2025 23:35:58 +0000 (19:35 -0400)
commitd29da1a8f119130e6fc7d5d71029d402dabe2cb0
treeddc41888d5b5fc571a0e516728759eace28261e4
parentc1ab70be88f3135cdb931673aae2afc5d6624b62
move_mount(2): take sanity checks in 'beneath' case into do_lock_mount()

We want to mount beneath the given location.  For that operation to
make sense, location must be the root of some mount that has something
under it.  Currently we let it proceed if those requirements are not met,
with rather meaningless results, and have that bogosity caught further
down the road; let's fail early instead - do_lock_mount() doesn't make
sense unless those conditions hold, and checking them there makes
things simpler.

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