Commit 9a2296832c43da93a88e1edd59f3d17acffca36c
Committed by
Al Viro
1 parent
51ee049e77
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
fs/namei.c
... | ... | @@ -523,9 +523,10 @@ |
523 | 523 | static inline void path_to_nameidata(struct path *path, struct nameidata *nd) |
524 | 524 | { |
525 | 525 | dput(nd->path.dentry); |
526 | - if (nd->path.mnt != path->mnt) | |
526 | + if (nd->path.mnt != path->mnt) { | |
527 | 527 | mntput(nd->path.mnt); |
528 | - nd->path.mnt = path->mnt; | |
528 | + nd->path.mnt = path->mnt; | |
529 | + } | |
529 | 530 | nd->path.dentry = path->dentry; |
530 | 531 | } |
531 | 532 |