summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-25 03:19:09 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-03 22:57:12 -0500
commit3a2393d71d77b034669d495b49c212a87e04abdc (patch)
treec113a99f76ae612d8da3a6ba95c0c6896dd504c4 /fs
parent909b0a88ef2dc86bd5d2223edf48eb30c865cb69 (diff)
vfs: opencode mntget() mnt_set_mountpoint()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c3
1 files changed, 2 insertions, 1 deletions
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);