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 | |
6b41d536 AV |
20 | struct list_head mnt_mounts; /* list of children, anchored here */ |
21 | struct list_head mnt_child; /* and going through their mnt_child */ | |
52ba1621 | 22 | const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
1a4eeaf2 | 23 | struct list_head mnt_list; |
6776db3d AV |
24 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
25 | struct list_head mnt_share; /* circular list of shared mounts */ | |
26 | struct list_head mnt_slave_list;/* list of slave mounts */ | |
27 | struct list_head mnt_slave; /* slave list entry */ | |
32301920 | 28 | struct mount *mnt_master; /* slave is on master->mnt_slave_list */ |
143c8c91 | 29 | struct mnt_namespace *mnt_ns; /* containing namespace */ |
c63181e6 AV |
30 | #ifdef CONFIG_FSNOTIFY |
31 | struct hlist_head mnt_fsnotify_marks; | |
32 | __u32 mnt_fsnotify_mask; | |
33 | #endif | |
15169fe7 AV |
34 | int mnt_id; /* mount identifier */ |
35 | int mnt_group_id; /* peer group identifier */ | |
863d684f AV |
36 | int mnt_expiry_mark; /* true if marked for expiry */ |
37 | int mnt_pinned; | |
38 | int mnt_ghosts; | |
7d6fec45 AV |
39 | }; |
40 | ||
41 | static inline struct mount *real_mount(struct vfsmount *mnt) | |
42 | { | |
43 | return container_of(mnt, struct mount, mnt); | |
44 | } | |
45 | ||
676da58d | 46 | static inline int mnt_has_parent(struct mount *mnt) |
b2dba1af | 47 | { |
0714a533 | 48 | return mnt != mnt->mnt_parent; |
b2dba1af | 49 | } |
c7105365 AV |
50 | |
51 | extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int); |