aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 208c079e9fdb..a0d0ef1f1a48 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -345,6 +345,7 @@ static void umount_tree(struct vfsmount *mnt)
345 for (p = mnt; p; p = next_mnt(p, mnt)) { 345 for (p = mnt; p; p = next_mnt(p, mnt)) {
346 list_del(&p->mnt_list); 346 list_del(&p->mnt_list);
347 list_add(&p->mnt_list, &kill); 347 list_add(&p->mnt_list, &kill);
348 p->mnt_namespace = NULL;
348 } 349 }
349 350
350 while (!list_empty(&kill)) { 351 while (!list_empty(&kill)) {
@@ -1449,15 +1450,8 @@ void __init mnt_init(unsigned long mempages)
1449 1450
1450void __put_namespace(struct namespace *namespace) 1451void __put_namespace(struct namespace *namespace)
1451{ 1452{
1452 struct vfsmount *mnt;
1453
1454 down_write(&namespace->sem); 1453 down_write(&namespace->sem);
1455 spin_lock(&vfsmount_lock); 1454 spin_lock(&vfsmount_lock);
1456
1457 list_for_each_entry(mnt, &namespace->list, mnt_list) {
1458 mnt->mnt_namespace = NULL;
1459 }
1460
1461 umount_tree(namespace->root); 1455 umount_tree(namespace->root);
1462 spin_unlock(&vfsmount_lock); 1456 spin_unlock(&vfsmount_lock);
1463 up_write(&namespace->sem); 1457 up_write(&namespace->sem);