mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH][resend] namei.c : update mnt when it needed
@ 2010-04-14  2:16 Huang Shijie
  2010-04-14  4:48 ` Amerigo Wang
  0 siblings, 1 reply; 2+ messages in thread
From: Huang Shijie @ 2010-04-14  2:16 UTC (permalink / raw)
  To: akpm; +Cc: viro, linux-kernel, Huang Shijie

update the mnt of the path when it is not equal to the new one.

Signed-off-by: Huang Shijie <shijie8@gmail.com>
---
 fs/namei.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index a7dce91..9c3a040 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;
 }
 
-- 
1.6.6


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][resend] namei.c : update mnt when it needed
  2010-04-14  2:16 [PATCH][resend] namei.c : update mnt when it needed Huang Shijie
@ 2010-04-14  4:48 ` Amerigo Wang
  0 siblings, 0 replies; 2+ messages in thread
From: Amerigo Wang @ 2010-04-14  4:48 UTC (permalink / raw)
  To: Huang Shijie; +Cc: akpm, viro, linux-kernel

On Wed, Apr 14, 2010 at 10:16:09AM +0800, Huang Shijie wrote:
>update the mnt of the path when it is not equal to the new one.
>
>Signed-off-by: Huang Shijie <shijie8@gmail.com>


This change is trivial, and it looks fine for me.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>

Thanks!


>---
> fs/namei.c |    5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
>diff --git a/fs/namei.c b/fs/namei.c
>index a7dce91..9c3a040 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;
> }
> 
>-- 
>1.6.6
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-14  4:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-14  2:16 [PATCH][resend] namei.c : update mnt when it needed Huang Shijie
2010-04-14  4:48 ` Amerigo Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®