mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
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: Huang Shijie <shijie8@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
51ee049e77
commit
9a2296832c
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue