diff options
Diffstat (limited to 'include/linux/mount.h')
| -rw-r--r-- | include/linux/mount.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h index f8f39937e301..dd4e83eba933 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -17,12 +17,14 @@ | |||
| 17 | #include <linux/spinlock.h> | 17 | #include <linux/spinlock.h> |
| 18 | #include <asm/atomic.h> | 18 | #include <asm/atomic.h> |
| 19 | 19 | ||
| 20 | #define MNT_NOSUID 1 | 20 | #define MNT_NOSUID 0x01 |
| 21 | #define MNT_NODEV 2 | 21 | #define MNT_NODEV 0x02 |
| 22 | #define MNT_NOEXEC 4 | 22 | #define MNT_NOEXEC 0x04 |
| 23 | #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ | ||
| 24 | #define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */ | ||
| 25 | #define MNT_PNODE_MASK 0x30 /* propogation flag mask */ | ||
| 23 | 26 | ||
| 24 | struct vfsmount | 27 | struct vfsmount { |
| 25 | { | ||
| 26 | struct list_head mnt_hash; | 28 | struct list_head mnt_hash; |
| 27 | struct vfsmount *mnt_parent; /* fs we are mounted on */ | 29 | struct vfsmount *mnt_parent; /* fs we are mounted on */ |
| 28 | struct dentry *mnt_mountpoint; /* dentry of mountpoint */ | 30 | struct dentry *mnt_mountpoint; /* dentry of mountpoint */ |
| @@ -36,7 +38,12 @@ struct vfsmount | |||
| 36 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ | 38 | char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ |
| 37 | struct list_head mnt_list; | 39 | struct list_head mnt_list; |
| 38 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | 40 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
| 41 | struct list_head mnt_share; /* circular list of shared mounts */ | ||
| 42 | struct list_head mnt_slave_list;/* list of slave mounts */ | ||
| 43 | struct list_head mnt_slave; /* slave list entry */ | ||
| 44 | struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ | ||
| 39 | struct namespace *mnt_namespace; /* containing namespace */ | 45 | struct namespace *mnt_namespace; /* containing namespace */ |
| 46 | int mnt_pinned; | ||
| 40 | }; | 47 | }; |
| 41 | 48 | ||
| 42 | static inline struct vfsmount *mntget(struct vfsmount *mnt) | 49 | static inline struct vfsmount *mntget(struct vfsmount *mnt) |
| @@ -46,15 +53,9 @@ static inline struct vfsmount *mntget(struct vfsmount *mnt) | |||
| 46 | return mnt; | 53 | return mnt; |
| 47 | } | 54 | } |
| 48 | 55 | ||
| 49 | extern void __mntput(struct vfsmount *mnt); | 56 | extern void mntput_no_expire(struct vfsmount *mnt); |
| 50 | 57 | extern void mnt_pin(struct vfsmount *mnt); | |
| 51 | static inline void mntput_no_expire(struct vfsmount *mnt) | 58 | extern void mnt_unpin(struct vfsmount *mnt); |
| 52 | { | ||
| 53 | if (mnt) { | ||
| 54 | if (atomic_dec_and_test(&mnt->mnt_count)) | ||
| 55 | __mntput(mnt); | ||
| 56 | } | ||
| 57 | } | ||
| 58 | 59 | ||
| 59 | static inline void mntput(struct vfsmount *mnt) | 60 | static inline void mntput(struct vfsmount *mnt) |
| 60 | { | 61 | { |
