mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Amerigo Wang <xiyou.wangcong@gmail.com>
To: Huang Shijie <shijie8@gmail.com>
Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][resend] namei.c : update mnt when it needed
Date: Wed, 14 Apr 2010 12:48:05 +0800	[thread overview]
Message-ID: <20100414044805.GE3919@cr0.nay.redhat.com> (raw)
In-Reply-To: <1271211369-27419-1-git-send-email-shijie8@gmail.com>

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/

      reply	other threads:[~2010-04-14  4:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-14  2:16 Huang Shijie
2010-04-14  4:48 ` Amerigo Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100414044805.GE3919@cr0.nay.redhat.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shijie8@gmail.com \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®