From 719ea2fbb553ab3f61a174a4b5861289dcc46cb1 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 29 Sep 2013 11:24:49 -0400 Subject: 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 --- fs/mount.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'fs/mount.h') 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 @@ #include #include #include +#include struct mnt_namespace { atomic_t count; @@ -83,6 +84,18 @@ static inline void get_mnt_ns(struct mnt_namespace *ns) atomic_inc(&ns->count); } +extern struct lglock vfsmount_lock; + +static inline void lock_mount_hash(void) +{ + br_write_lock(&vfsmount_lock); +} + +static inline void unlock_mount_hash(void) +{ + br_write_unlock(&vfsmount_lock); +} + struct proc_mounts { struct seq_file m; struct mnt_namespace *ns; -- cgit v1.2.3-59-g8ed1b