diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 10 |
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; |
712 | found: | ||
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; |
714 | done: | 715 | done: |
@@ -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 | ||
778 | need_revalidate: | 772 | need_revalidate: |
779 | dentry = do_revalidate(dentry, nd); | 773 | dentry = do_revalidate(dentry, nd); |