From 592238c03ef9e44ad6031b671da869ebcbffa8dc Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 8 May 2025 17:28:00 -0400 Subject: pnode: lift peers() into pnode.h it's going to be useful both in pnode.c and namespace.c Reviewed-by: Christian Brauner Signed-off-by: Al Viro --- fs/pnode.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'fs/pnode.h') diff --git a/fs/pnode.h b/fs/pnode.h index 2d026fb98b18..93fa9311bd07 100644 --- a/fs/pnode.h +++ b/fs/pnode.h @@ -34,6 +34,11 @@ static inline void set_mnt_shared(struct mount *mnt) mnt->mnt.mnt_flags |= MNT_SHARED; } +static inline bool peers(const struct mount *m1, const struct mount *m2) +{ + return m1->mnt_group_id == m2->mnt_group_id && m1->mnt_group_id; +} + void change_mnt_propagation(struct mount *, int); int propagate_mnt(struct mount *, struct mountpoint *, struct mount *, struct hlist_head *); -- cgit