namei.c : update mnt when it needed
PATCH 1/1 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 <[email protected]>
--- fs/namei.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
fs/namei.c +3 -2
@@ -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; }
Signature · 1 line
1.6.6