From: Al Viro <viro@ZenIV.linux.org.uk>
To: Dave Chinner <david@fromorbit.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [git pull] VFS - the first pile
Date: Wed, 16 Mar 2011 06:51:03 +0000 [thread overview]
Message-ID: <20110316065103.GP22723@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20110316061917.GA30195@dastard>
On Wed, Mar 16, 2011 at 05:19:17PM +1100, Dave Chinner wrote:
> I think there's something not quite right in this tree. xfstests 005
> (nested symlink test) fails on both ext4 and XFS with the following:
Yeah... Brown paperbag time - it's actually a missing piece that
got glued with a commit a bit later in queue ;-/ I've dropped it
into for-linus for the morning push; in the meanwhile, the patch is
below.
diff --git a/fs/namei.c b/fs/namei.c
index 0a601ca..b912b7a 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -753,9 +753,11 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
BUG_ON(nd->flags & LOOKUP_RCU);
+ if (link->mnt == nd->path.mnt)
+ mntget(link->mnt);
+
if (unlikely(current->total_link_count >= 40)) {
*p = ERR_PTR(-ELOOP); /* no ->put_link(), please */
- path_put_conditional(link, nd);
path_put(&nd->path);
return -ELOOP;
}
@@ -765,9 +767,6 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
touch_atime(link->mnt, dentry);
nd_set_link(nd, NULL);
- if (link->mnt == nd->path.mnt)
- mntget(link->mnt);
-
error = security_inode_follow_link(link->dentry, nd);
if (error) {
*p = ERR_PTR(error); /* no ->put_link(), please */
next prev parent reply other threads:[~2011-03-16 6:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 21:32 [git pull] VFS - the first pile Al Viro
2011-03-15 22:02 ` Sam Ravnborg
2011-03-15 22:18 ` Al Viro
2011-03-15 22:47 ` Linus Torvalds
2011-03-15 23:02 ` Al Viro
2011-03-16 6:19 ` Dave Chinner
2011-03-16 6:51 ` Al Viro [this message]
2011-03-16 7:21 ` Al Viro
2011-03-16 11:46 ` Theodore Tso
2011-03-16 13:07 ` Christoph Hellwig
2011-03-16 13:15 ` Al Viro
2011-03-16 13:18 ` Christoph Hellwig
2011-03-16 13:05 ` Christoph Hellwig
2011-03-16 13:10 ` Christoph Hellwig
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=20110316065103.GP22723@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=david@fromorbit.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/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