diff --git a/[refs] b/[refs] index 3ea74eeb8cba..78c6f4d861e7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 37c17e1f377696c797e75c1e915e838b3e0c6120 +refs/heads/master: acc9cb3cd425f479d8fc4a441bff45dce23aa6dd diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 48fc0fb8c9d1..9ce43a358c33 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1173,7 +1173,6 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, BUG_ON(nd->inode != dir); mutex_lock(&dir->i_mutex); -l: dentry = d_lookup(parent, name); if (likely(!dentry)) { dentry = d_alloc_and_lookup(parent, name, nd); @@ -1204,9 +1203,14 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, } if (!d_invalidate(dentry)) { dput(dentry); - dentry = NULL; - need_reval = 1; - goto l; + dentry = d_alloc_and_lookup(parent, name, nd); + if (IS_ERR(dentry)) { + mutex_unlock(&dir->i_mutex); + return PTR_ERR(dentry); + } + /* known good */ + need_reval = 0; + status = 1; } } mutex_unlock(&dir->i_mutex);