From 6cbf4ae82f44c7a2618be1da3f6c3efb0fcfab8b Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 21 May 2012 17:30:08 +0200 Subject: [PATCH] --- yaml --- r: 310057 b: refs/heads/master c: decf3400879d02d0eafedea52c7f208587be062a h: refs/heads/master i: 310055: 25a2f953c088edbaa1ded937fd3be25921419a36 v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 28e68e96b6ba..b1c3b77b5791 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a1eb33153090549e622ab42cb375af06614dd7a8 +refs/heads/master: decf3400879d02d0eafedea52c7f208587be062a diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index f6b31c94c110..41445e7fd339 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -2358,15 +2358,17 @@ static struct file *do_last(struct nameidata *nd, struct path *path, if (error) nd->flags |= LOOKUP_JUMPED; + BUG_ON(nd->flags & LOOKUP_RCU); + inode = path->dentry->d_inode; error = -ENOENT; - if (!path->dentry->d_inode) + if (!inode) goto exit_dput; - if (path->dentry->d_inode->i_op->follow_link) + if (inode->i_op->follow_link) return NULL; path_to_nameidata(path, nd); - nd->inode = path->dentry->d_inode; + nd->inode = inode; /* Why this, you ask? _Now_ we might have grown LOOKUP_JUMPED... */ error = complete_walk(nd); if (error)