|
|
@@ -1217,6 +1217,11 @@ static void namespace_unlock(void)
|
|
|
head.first->pprev = &head.first;
|
|
|
INIT_HLIST_HEAD(&unmounted);
|
|
|
|
|
|
+ /* undo decrements we'd done in umount_tree() */
|
|
|
+ hlist_for_each_entry(mnt, &head, mnt_hash)
|
|
|
+ if (mnt->mnt_ex_mountpoint.mnt)
|
|
|
+ mntget(mnt->mnt_ex_mountpoint.mnt);
|
|
|
+
|
|
|
up_write(&namespace_sem);
|
|
|
|
|
|
synchronize_rcu();
|
|
|
@@ -1268,6 +1273,7 @@ void umount_tree(struct mount *mnt, int how)
|
|
|
p->mnt.mnt_flags |= MNT_SYNC_UMOUNT;
|
|
|
if (mnt_has_parent(p)) {
|
|
|
put_mountpoint(p->mnt_mp);
|
|
|
+ mnt_add_count(p->mnt_parent, -1);
|
|
|
/* move the reference to mountpoint into ->mnt_ex_mountpoint */
|
|
|
p->mnt_ex_mountpoint.dentry = p->mnt_mountpoint;
|
|
|
p->mnt_ex_mountpoint.mnt = &p->mnt_parent->mnt;
|