untangling do_lookup() - merge d_alloc_and_lookup() callers
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 30 Mar 2012 18:39:15 +0000 (14:39 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 31 Mar 2012 20:03:16 +0000 (16:03 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c

index a0f9a0294ff2ec8d7a764d4abee47966f8111ae7..1d60fdf01b3730c883d850f1e72136db2d044a8e 100644 (file)
@@ -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))