mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-24 14:34:46 +07:00

vfsmounts have ->mnt_parent pointing either to a different vfsmount or to itself; it's never NULL and termination condition in loops traversing the tree towards root is mnt == mnt->mnt_parent. At least one place (see the next patch) is confused about what's going on; let's add an explicit helper checking it right way and use it in all places where we need it. Not that there had been too many, but... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
7 lines
117 B
C
7 lines
117 B
C
#include <linux/mount.h>
|
|
|
|
static inline int mnt_has_parent(struct vfsmount *mnt)
|
|
{
|
|
return mnt != mnt->mnt_parent;
|
|
}
|