diff --git a/[refs] b/[refs] index 0bbfe4331860..3ea74eeb8cba 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3f6c7c71a2af6eb306e16562c6ee1bfdb48015fb +refs/heads/master: 37c17e1f377696c797e75c1e915e838b3e0c6120 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 157f3debbf98..48fc0fb8c9d1 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -1173,6 +1173,7 @@ 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); @@ -1193,11 +1194,11 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, need_reval = 0; status = 1; } - mutex_unlock(&dir->i_mutex); if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE) && need_reval) status = d_revalidate(dentry, nd); if (unlikely(status <= 0)) { if (status < 0) { + mutex_unlock(&dir->i_mutex); dput(dentry); return status; } @@ -1205,9 +1206,10 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, dput(dentry); dentry = NULL; need_reval = 1; - goto retry; + goto l; } } + mutex_unlock(&dir->i_mutex); goto done; } if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE) && need_reval)