Skip to content

Commit

Permalink
vfs: opencode mntget() mnt_set_mountpoint()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Jan 4, 2012
1 parent 909b0a8 commit 3a2393d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3a2393d

Please sign in to comment.