summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-21 23:59:49 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-03-27 20:47:46 -0400
commit7c4b93d8269b9d35971a8239426b1f6ddc3d5ef7 (patch)
treea3309f9237f9d67af000e484bef9c19a7951750a /fs/namespace.c
parent1a39068954e33f4bf3e09375a8112dcc801c4688 (diff)
[PATCH] count ghost references to vfsmounts
make propagate_mount_busy() exclude references from the vfsmounts that had been isolated by umount_tree() and are just waiting for release_mounts() to dispose of their ->mnt_parent/->mnt_mountpoint. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 6324dfc80dc6..c175218ebae1 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -548,6 +548,7 @@ void release_mounts(struct list_head *head)
m = mnt->mnt_parent;
mnt->mnt_mountpoint = mnt->mnt_root;
mnt->mnt_parent = mnt;
+ m->mnt_ghosts--;
spin_unlock(&vfsmount_lock);
dput(dentry);
mntput(m);
@@ -572,8 +573,10 @@ void umount_tree(struct vfsmount *mnt, int propagate, struct list_head *kill)
__touch_mnt_namespace(p->mnt_ns);
p->mnt_ns = NULL;
list_del_init(&p->mnt_child);
- if (p->mnt_parent != p)
+ if (p->mnt_parent != p) {
+ p->mnt_parent->mnt_ghosts++;
p->mnt_mountpoint->d_mounted--;
+ }
change_mnt_propagation(p, MS_PRIVATE);
}
}