Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153831
b: refs/heads/master
c: 616511d
h: refs/heads/master
i:
  153829: a17de0a
  153827: fa313b6
  153823: 12bf38e
v: v3
  • Loading branch information
Trond Myklebust authored and Linus Torvalds committed Jun 23, 2009
1 parent afce9fa commit 1d9cf0b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31950eb66ff47c946fd9c65c2f8c94b6b7ba13fc
refs/heads/master: 616511d039af402670de8500d0e24495113a9cab
8 changes: 6 additions & 2 deletions trunk/fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2246,10 +2246,14 @@ void __init mnt_init(void)
init_mount_tree();
}

void __put_mnt_ns(struct mnt_namespace *ns)
void put_mnt_ns(struct mnt_namespace *ns)
{
struct vfsmount *root = ns->root;
struct vfsmount *root;
LIST_HEAD(umount_list);

if (!atomic_dec_and_lock(&ns->count, &vfsmount_lock))
return;
root = ns->root;
ns->root = NULL;
spin_unlock(&vfsmount_lock);
down_write(&namespace_sem);
Expand Down
9 changes: 1 addition & 8 deletions trunk/include/linux/mnt_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
__put_mnt_ns(ns);
}
extern void put_mnt_ns(struct mnt_namespace *ns);

static inline void exit_mnt_ns(struct task_struct *p)
{
Expand Down

0 comments on commit 1d9cf0b

Please sign in to comment.