blob: 201dd616e6c44e3a82cc2564b14922b0dea68fcb [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 Viro7d6fec42011-11-23 12:14:10 -05006 struct vfsmount mnt;
7};
8
9static inline struct mount *real_mount(struct vfsmount *mnt)
10{
11 return container_of(mnt, struct mount, mnt);
12}
13
Al Viro676da582011-11-24 21:47:05 -050014static inline int mnt_has_parent(struct mount *mnt)
Al Virob2dba1a2011-11-23 19:26:23 -050015{
Al Viro0714a532011-11-24 22:19:58 -050016 return mnt != mnt->mnt_parent;
Al Virob2dba1a2011-11-23 19:26:23 -050017}
Al Viroc7105362011-11-24 18:22:03 -050018
19extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int);