From: Huang Shijie Date: Fri, 2 Apr 2010 09:37:13 +0000 (+0800) Subject: namei.c : update mnt when it needed X-Git-Tag: v3.12-rc1~10237^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a2296832c43da93a88e1edd59f3d17acffca36c;p=kernel%2Fkernel-generic.git 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 Signed-off-by: Al Viro --- diff --git a/fs/namei.c b/fs/namei.c index b86b96f..48e1f60 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -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; }