From 3a2393d71d77b034669d495b49c212a87e04abdc Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 25 Nov 2011 03:19:09 -0500 Subject: vfs: opencode mntget() mnt_set_mountpoint() Signed-off-by: Al Viro --- fs/namespace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/namespace.c b/fs/namespace.c index 24e845671ad..cd6389387d1 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -572,8 +572,9 @@ static void detach_mnt(struct mount *mnt, struct path *old_path) void mnt_set_mountpoint(struct mount *mnt, struct dentry *dentry, struct mount *child_mnt) { - child_mnt->mnt_parent = real_mount(mntget(&mnt->mnt)); + mnt_add_count(mnt, 1); /* essentially, that's mntget */ child_mnt->mnt_mountpoint = dget(dentry); + child_mnt->mnt_parent = mnt; spin_lock(&dentry->d_lock); dentry->d_flags |= DCACHE_MOUNTED; spin_unlock(&dentry->d_lock); -- cgit v1.2.3-70-g09d2