aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 24e845671ad3..cd6389387d1f 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -572,8 +572,9 @@ static void detach_mnt(struct mount *mnt, struct path *old_path)
572void mnt_set_mountpoint(struct mount *mnt, struct dentry *dentry, 572void mnt_set_mountpoint(struct mount *mnt, struct dentry *dentry,
573 struct mount *child_mnt) 573 struct mount *child_mnt)
574{ 574{
575 child_mnt->mnt_parent = real_mount(mntget(&mnt->mnt)); 575 mnt_add_count(mnt, 1); /* essentially, that's mntget */
576 child_mnt->mnt_mountpoint = dget(dentry); 576 child_mnt->mnt_mountpoint = dget(dentry);
577 child_mnt->mnt_parent = mnt;
577 spin_lock(&dentry->d_lock); 578 spin_lock(&dentry->d_lock);
578 dentry->d_flags |= DCACHE_MOUNTED; 579 dentry->d_flags |= DCACHE_MOUNTED;
579 spin_unlock(&dentry->d_lock); 580 spin_unlock(&dentry->d_lock);