mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
vfs: new internal helper: mnt_has_parent(mnt)
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>
This commit is contained in:
parent
aa9c0e07bb
commit
b2dba1af3c
5 changed files with 18 additions and 12 deletions
|
@ -9,7 +9,7 @@
|
|||
#define _LINUX_PNODE_H
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/mount.h>
|
||||
#include "mount.h"
|
||||
|
||||
#define IS_MNT_SHARED(mnt) (mnt->mnt_flags & MNT_SHARED)
|
||||
#define IS_MNT_SLAVE(mnt) (mnt->mnt_master)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue