diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-29 11:24:49 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-24 23:34:59 -0400 |
commit | 719ea2fbb553ab3f61a174a4b5861289dcc46cb1 (patch) | |
tree | 00c1e2c71caf2338cfe27f2854cf331515b4f411 /fs/mount.h | |
parent | aab407fc5c0ce63e9fd4a34a790d7290d3e116a1 (diff) |
new helpers: lock_mount_hash/unlock_mount_hash
aka br_write_{lock,unlock} of vfsmount_lock. Inlines in fs/mount.h,
vfsmount_lock extern moved over there as well.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/mount.h')
-rw-r--r-- | fs/mount.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/mount.h b/fs/mount.h index 3168dc41bad5..7076f25af35d 100644 --- a/fs/mount.h +++ b/fs/mount.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #include <linux/mount.h> | 1 | #include <linux/mount.h> |
2 | #include <linux/seq_file.h> | 2 | #include <linux/seq_file.h> |
3 | #include <linux/poll.h> | 3 | #include <linux/poll.h> |
4 | #include <linux/lglock.h> | ||
4 | 5 | ||
5 | struct mnt_namespace { | 6 | struct mnt_namespace { |
6 | atomic_t count; | 7 | atomic_t count; |
@@ -83,6 +84,18 @@ static inline void get_mnt_ns(struct mnt_namespace *ns) | |||
83 | atomic_inc(&ns->count); | 84 | atomic_inc(&ns->count); |
84 | } | 85 | } |
85 | 86 | ||
87 | extern struct lglock vfsmount_lock; | ||
88 | |||
89 | static inline void lock_mount_hash(void) | ||
90 | { | ||
91 | br_write_lock(&vfsmount_lock); | ||
92 | } | ||
93 | |||
94 | static inline void unlock_mount_hash(void) | ||
95 | { | ||
96 | br_write_unlock(&vfsmount_lock); | ||
97 | } | ||
98 | |||
86 | struct proc_mounts { | 99 | struct proc_mounts { |
87 | struct seq_file m; | 100 | struct seq_file m; |
88 | struct mnt_namespace *ns; | 101 | struct mnt_namespace *ns; |