Skip to content

Commit a6ecdfc

Browse files
author
Al Viro
committed
untangling do_lookup() - merge d_alloc_and_lookup() callers
Signed-off-by: Al Viro <[email protected]>
1 parent ec335e9 commit a6ecdfc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/namei.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,12 +1188,12 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
11881188
}
11891189
if (!d_invalidate(dentry)) {
11901190
dput(dentry);
1191-
dentry = d_alloc_and_lookup(parent, name, nd);
1191+
dentry = NULL;
11921192
}
11931193
}
1194-
} else if (!dentry) {
1195-
dentry = d_alloc_and_lookup(parent, name, nd);
11961194
}
1195+
if (!dentry)
1196+
dentry = d_alloc_and_lookup(parent, name, nd);
11971197
l:
11981198
mutex_unlock(&dir->i_mutex);
11991199
if (IS_ERR(dentry))

0 commit comments

Comments
 (0)