]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
new predicate: mount_is_ancestor()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Jun 2025 03:10:33 +0000 (23:10 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 29 Jun 2025 22:13:41 +0000 (18:13 -0400)
commit9cb79ed60e38a0767b5b94c31bf1abf6518bc6b9
treec0b70b55a8575fd1e613bb8477cc4013e6fdc2e1
parent592238c03ef9e44ad6031b671da869ebcbffa8dc
new predicate: mount_is_ancestor()

mount_is_ancestor(p1, p2) returns true iff there is a possibly
empty ancestry chain from p1 to p2.

Convert the open-coded checks.  Unlike those open-coded variants
it does not depend upon p1 not being root...

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