Commit a6ecdfcf authored by Al Viro's avatar Al Viro

untangling do_lookup() - merge d_alloc_and_lookup() callers

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ec335e91
...@@ -1188,12 +1188,12 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, ...@@ -1188,12 +1188,12 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
} }
if (!d_invalidate(dentry)) { if (!d_invalidate(dentry)) {
dput(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: l:
mutex_unlock(&dir->i_mutex); mutex_unlock(&dir->i_mutex);
if (IS_ERR(dentry)) if (IS_ERR(dentry))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment