aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 17ea76bf2fbe..c2742b7dec59 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -709,6 +709,7 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
709 dentry = __d_lookup(nd->path.dentry, name); 709 dentry = __d_lookup(nd->path.dentry, name);
710 if (!dentry) 710 if (!dentry)
711 goto need_lookup; 711 goto need_lookup;
712found:
712 if (dentry->d_op && dentry->d_op->d_revalidate) 713 if (dentry->d_op && dentry->d_op->d_revalidate)
713 goto need_revalidate; 714 goto need_revalidate;
714done: 715done:
@@ -766,14 +767,7 @@ out_unlock:
766 * we waited on the semaphore. Need to revalidate. 767 * we waited on the semaphore. Need to revalidate.
767 */ 768 */
768 mutex_unlock(&dir->i_mutex); 769 mutex_unlock(&dir->i_mutex);
769 if (dentry->d_op && dentry->d_op->d_revalidate) { 770 goto found;
770 dentry = do_revalidate(dentry, nd);
771 if (!dentry)
772 dentry = ERR_PTR(-ENOENT);
773 }
774 if (IS_ERR(dentry))
775 goto fail;
776 goto done;
777 771
778need_revalidate: 772need_revalidate:
779 dentry = do_revalidate(dentry, nd); 773 dentry = do_revalidate(dentry, nd);