mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]>
This commit is contained in:
parent
aab407fc5c
commit
719ea2fbb5
5 changed files with 64 additions and 54 deletions
13
fs/mount.h
13
fs/mount.h
|
|
@ -1,6 +1,7 @@
|
|||
#include <linux/mount.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/lglock.h>
|
||||
|
||||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue