Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185726
b: refs/heads/master
c: d498b25
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Mar 3, 2010
1 parent 48dacd9 commit 5fb4f59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 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: 47cd813f2984569570021ce3d34cdf9cb20aa6a2
refs/heads/master: d498b25a4f877be535246c4e5b6ee5890781a477
8 changes: 2 additions & 6 deletions trunk/fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -2344,17 +2344,13 @@ void __init mnt_init(void)

void put_mnt_ns(struct mnt_namespace *ns)
{
struct vfsmount *root;
LIST_HEAD(umount_list);

if (!atomic_dec_and_lock(&ns->count, &vfsmount_lock))
if (!atomic_dec_and_test(&ns->count))
return;
root = ns->root;
ns->root = NULL;
spin_unlock(&vfsmount_lock);
down_write(&namespace_sem);
spin_lock(&vfsmount_lock);
umount_tree(root, 0, &umount_list);
umount_tree(ns->root, 0, &umount_list);
spin_unlock(&vfsmount_lock);
up_write(&namespace_sem);
release_mounts(&umount_list);
Expand Down

0 comments on commit 5fb4f59

Please sign in to comment.