lkml.org 
[lkml]   [2011]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [git pull] VFS - the first pile
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 */

\
 
 \ /
  Last update: 2011-03-16 07:53    [from the cache]
©2003-2011 Jasper Spaans