]>
Commit | Line | Data |
---|---|---|
b2dba1af AV |
1 | #include <linux/mount.h> |
2 | ||
68e8a9fe AV |
3 | struct mnt_pcp { |
4 | int mnt_count; | |
5 | int mnt_writers; | |
6 | }; | |
7 | ||
7d6fec45 | 8 | struct mount { |
1b8e5564 | 9 | struct list_head mnt_hash; |
0714a533 | 10 | struct mount *mnt_parent; |
a73324da | 11 | struct dentry *mnt_mountpoint; |
7d6fec45 | 12 | struct vfsmount mnt; |
68e8a9fe AV |
13 | #ifdef CONFIG_SMP |
14 | struct mnt_pcp __percpu *mnt_pcp; | |
15 | atomic_t mnt_longterm; /* how many of the refs are longterm */ | |
16 | #else | |
17 | int mnt_count; | |
18 | int mnt_writers; | |
19 | #endif | |
7d6fec45 AV |
20 | }; |
21 | ||
22 | static inline struct mount *real_mount(struct vfsmount *mnt) | |
23 | { | |
24 | return container_of(mnt, struct mount, mnt); | |
25 | } | |
26 | ||
676da58d | 27 | static inline int mnt_has_parent(struct mount *mnt) |
b2dba1af | 28 | { |
0714a533 | 29 | return mnt != mnt->mnt_parent; |
b2dba1af | 30 | } |
c7105365 AV |
31 | |
32 | extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int); |