vfs: opencode mntget() mnt_set_mountpoint()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -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,
|
void mnt_set_mountpoint(struct mount *mnt, struct dentry *dentry,
|
||||||
struct mount *child_mnt)
|
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_mountpoint = dget(dentry);
|
||||||
|
child_mnt->mnt_parent = mnt;
|
||||||
spin_lock(&dentry->d_lock);
|
spin_lock(&dentry->d_lock);
|
||||||
dentry->d_flags |= DCACHE_MOUNTED;
|
dentry->d_flags |= DCACHE_MOUNTED;
|
||||||
spin_unlock(&dentry->d_lock);
|
spin_unlock(&dentry->d_lock);
|
||||||
|
Reference in New Issue
Block a user