Al Viro | b2dba1a | 2011-11-23 19:26:23 -0500 | [diff] [blame] | 1 | #include <linux/mount.h> |
2 | |||||
Al Viro | 7d6fec4 | 2011-11-23 12:14:10 -0500 | [diff] [blame] | 3 | struct mount { |
Al Viro | 1b8e556 | 2011-11-24 21:01:32 -0500 | [diff] [blame] | 4 | struct list_head mnt_hash; |
Al Viro | 0714a53 | 2011-11-24 22:19:58 -0500 | [diff] [blame^] | 5 | struct mount *mnt_parent; |
Al Viro | 7d6fec4 | 2011-11-23 12:14:10 -0500 | [diff] [blame] | 6 | struct vfsmount mnt; |
7 | }; | ||||
8 | |||||
9 | static inline struct mount *real_mount(struct vfsmount *mnt) | ||||
10 | { | ||||
11 | return container_of(mnt, struct mount, mnt); | ||||
12 | } | ||||
13 | |||||
Al Viro | 676da58 | 2011-11-24 21:47:05 -0500 | [diff] [blame] | 14 | static inline int mnt_has_parent(struct mount *mnt) |
Al Viro | b2dba1a | 2011-11-23 19:26:23 -0500 | [diff] [blame] | 15 | { |
Al Viro | 0714a53 | 2011-11-24 22:19:58 -0500 | [diff] [blame^] | 16 | return mnt != mnt->mnt_parent; |
Al Viro | b2dba1a | 2011-11-23 19:26:23 -0500 | [diff] [blame] | 17 | } |
Al Viro | c710536 | 2011-11-24 18:22:03 -0500 | [diff] [blame] | 18 | |
19 | extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int); |