Commit 616511d0 authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds
Browse files

VFS: Uninline the function put_mnt_ns()

In order to allow modules to use it without having to export vfsmount_lock.
Signed-off-by: default avatarTrond Myklebust <>
Signed-off-by: default avatarLinus Torvalds <>
parent 31950eb6
......@@ -2246,10 +2246,14 @@ void __init mnt_init(void)
void __put_mnt_ns(struct mnt_namespace *ns)
void put_mnt_ns(struct mnt_namespace *ns)
struct vfsmount *root = ns->root;
struct vfsmount *root;
if (!atomic_dec_and_lock(&ns->count, &vfsmount_lock))
root = ns->root;
ns->root = NULL;
......@@ -26,14 +26,7 @@ struct fs_struct;
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
struct fs_struct *);
extern void __put_mnt_ns(struct mnt_namespace *ns);
static inline void put_mnt_ns(struct mnt_namespace *ns)
if (atomic_dec_and_lock(&ns->count, &vfsmount_lock))
/* releases vfsmount_lock */
extern void put_mnt_ns(struct mnt_namespace *ns);
static inline void exit_mnt_ns(struct task_struct *p)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment