summaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c
index a0f9a0294ff..1d60fdf01b3 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1188,12 +1188,12 @@ retry:
}
if (!d_invalidate(dentry)) {
dput(dentry);
- dentry = d_alloc_and_lookup(parent, name, nd);
+ dentry = NULL;
}
}
- } else if (!dentry) {
- dentry = d_alloc_and_lookup(parent, name, nd);
}
+ if (!dentry)
+ dentry = d_alloc_and_lookup(parent, name, nd);
l:
mutex_unlock(&dir->i_mutex);
if (IS_ERR(dentry))