* [patch 7/7] namei.c: update mnt when it is needed
@ 2010-04-27 21:24 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2010-04-27 21:24 UTC (permalink / raw)
To: viro; +Cc: linux-fsdevel, akpm, shijie8, xiyou.wangcong
From: Huang Shijie <shijie8@gmail.com>
Update the mnt of the path when it is not equal to the new one.
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/namei.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff -puN fs/namei.c~nameic-update-mnt-when-it-needed fs/namei.c
--- a/fs/namei.c~nameic-update-mnt-when-it-needed
+++ a/fs/namei.c
@@ -523,9 +523,10 @@ static void path_put_conditional(struct
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;
}
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-04-27 21:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27 21:24 [patch 7/7] namei.c: update mnt when it is needed akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).