1b2dba1afSAl Viro #include <linux/mount.h> 2b2dba1afSAl Viro 368e8a9feSAl Viro struct mnt_pcp { 468e8a9feSAl Viro int mnt_count; 568e8a9feSAl Viro int mnt_writers; 668e8a9feSAl Viro }; 768e8a9feSAl Viro 87d6fec45SAl Viro struct mount { 91b8e5564SAl Viro struct list_head mnt_hash; 100714a533SAl Viro struct mount *mnt_parent; 11a73324daSAl Viro struct dentry *mnt_mountpoint; 127d6fec45SAl Viro struct vfsmount mnt; 1368e8a9feSAl Viro #ifdef CONFIG_SMP 1468e8a9feSAl Viro struct mnt_pcp __percpu *mnt_pcp; 1568e8a9feSAl Viro atomic_t mnt_longterm; /* how many of the refs are longterm */ 1668e8a9feSAl Viro #else 1768e8a9feSAl Viro int mnt_count; 1868e8a9feSAl Viro int mnt_writers; 1968e8a9feSAl Viro #endif 206b41d536SAl Viro struct list_head mnt_mounts; /* list of children, anchored here */ 216b41d536SAl Viro struct list_head mnt_child; /* and going through their mnt_child */ 226776db3dSAl Viro /* yet to be moved - up to mnt_list */ 236776db3dSAl Viro struct list_head mnt_expire; /* link in fs-specific expiry list */ 246776db3dSAl Viro struct list_head mnt_share; /* circular list of shared mounts */ 256776db3dSAl Viro struct list_head mnt_slave_list;/* list of slave mounts */ 266776db3dSAl Viro struct list_head mnt_slave; /* slave list entry */ 2732301920SAl Viro struct mount *mnt_master; /* slave is on master->mnt_slave_list */ 28143c8c91SAl Viro struct mnt_namespace *mnt_ns; /* containing namespace */ 2915169fe7SAl Viro int mnt_id; /* mount identifier */ 3015169fe7SAl Viro int mnt_group_id; /* peer group identifier */ 31863d684fSAl Viro int mnt_expiry_mark; /* true if marked for expiry */ 32863d684fSAl Viro int mnt_pinned; 33863d684fSAl Viro int mnt_ghosts; 347d6fec45SAl Viro }; 357d6fec45SAl Viro 367d6fec45SAl Viro static inline struct mount *real_mount(struct vfsmount *mnt) 377d6fec45SAl Viro { 387d6fec45SAl Viro return container_of(mnt, struct mount, mnt); 397d6fec45SAl Viro } 407d6fec45SAl Viro 41676da58dSAl Viro static inline int mnt_has_parent(struct mount *mnt) 42b2dba1afSAl Viro { 430714a533SAl Viro return mnt != mnt->mnt_parent; 44b2dba1afSAl Viro } 45c7105365SAl Viro 46c7105365SAl Viro extern struct mount *__lookup_mnt(struct vfsmount *, struct dentry *, int); 47