blob: 853738f5897f32bbcc15fa3f507a73d53d570208 [file] [log] [blame]
Al Virob2dba1a2011-11-23 19:26:23 -05001#include <linux/mount.h>
2
Al Viro7d6fec42011-11-23 12:14:10 -05003struct mount {
Al Viro1b8e5562011-11-24 21:01:32 -05004 struct list_head mnt_hash;
Al Viro0714a532011-11-24 22:19:58 -05005 struct mount *mnt_parent;
Al Viroa73324d2011-11-24 22:25:07 -05006 struct dentry *mnt_mountpoint;
Al Viro7d6fec42011-11-23 12:14:10 -05007 struct vfsmount mnt;
8};
9
10static inline struct mount *real_mount(struct vfsmount *mnt)
11{
12 return container_of(mnt, struct mount, mnt);
13}
14
Al Viro676da582011-11-24 21:47:05 -050015static inline int mnt_has_parent(struct mount *mnt)
Al Virob2dba1a2011-11-23 19:26:23 -050016{
Al Viro0714a532011-11-24 22:19:58 -050017 return mnt != mnt->mnt_parent;
Al Virob2dba1a2011-11-23 19:26:23 -050018}
Al Viroc7105362011-11-24 18:22:03 -050019
20extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int);