diff options
Diffstat (limited to 'include/linux/mount.h')
| -rw-r--r-- | include/linux/mount.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/include/linux/mount.h b/include/linux/mount.h index f8f39937e301..ffb0b5089880 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
| @@ -37,6 +37,7 @@ struct vfsmount | |||
| 37 | struct list_head mnt_list; | 37 | struct list_head mnt_list; |
| 38 | struct list_head mnt_expire; /* link in fs-specific expiry list */ | 38 | struct list_head mnt_expire; /* link in fs-specific expiry list */ |
| 39 | struct namespace *mnt_namespace; /* containing namespace */ | 39 | struct namespace *mnt_namespace; /* containing namespace */ |
| 40 | int mnt_pinned; | ||
| 40 | }; | 41 | }; |
| 41 | 42 | ||
| 42 | static inline struct vfsmount *mntget(struct vfsmount *mnt) | 43 | static inline struct vfsmount *mntget(struct vfsmount *mnt) |
| @@ -46,15 +47,9 @@ static inline struct vfsmount *mntget(struct vfsmount *mnt) | |||
| 46 | return mnt; | 47 | return mnt; |
| 47 | } | 48 | } |
| 48 | 49 | ||
| 49 | extern void __mntput(struct vfsmount *mnt); | 50 | extern void mntput_no_expire(struct vfsmount *mnt); |
| 50 | 51 | extern void mnt_pin(struct vfsmount *mnt); | |
| 51 | static inline void mntput_no_expire(struct vfsmount *mnt) | 52 | 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 | 53 | ||
| 59 | static inline void mntput(struct vfsmount *mnt) | 54 | static inline void mntput(struct vfsmount *mnt) |
| 60 | { | 55 | { |
