提交 9a229683 编写于 作者: H Huang Shijie 提交者: Al Viro

namei.c : update mnt when it needed

update the mnt of the path when it is not equal to the new one.
Signed-off-by: NHuang Shijie <shijie8@gmail.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 51ee049e
......@@ -523,9 +523,10 @@ static void path_put_conditional(struct path *path, struct nameidata *nd)
static inline void path_to_nameidata(struct path *path, struct nameidata *nd)
{
dput(nd->path.dentry);
if (nd->path.mnt != path->mnt)
if (nd->path.mnt != path->mnt) {
mntput(nd->path.mnt);
nd->path.mnt = path->mnt;
nd->path.mnt = path->mnt;
}
nd->path.dentry = path->dentry;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册