projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
88d8331
)
make lookup_one_len() safe to use with directory locked shared
author
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 6 Apr 2018 20:45:33 +0000
(16:45 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Fri, 6 Apr 2018 20:45:33 +0000
(16:45 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c
patch
|
blob
|
history
diff --git
a/fs/namei.c
b/fs/namei.c
index ba48e154409bcca575b1d7548ece054a31394ec9..6e0f6eea98960fbaf79357ae56d2425c7e224d15 100644
(file)
--- a/
fs/namei.c
+++ b/
fs/namei.c
@@
-2471,6
+2471,7
@@
static int lookup_one_len_common(const char *name, struct dentry *base,
*/
struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
{
+ struct dentry *dentry;
struct qstr this;
int err;
@@
-2480,7
+2481,8
@@
struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
if (err)
return ERR_PTR(err);
- return __lookup_hash(&this, base, 0);
+ dentry = lookup_dcache(&this, base, 0);
+ return dentry ? dentry : __lookup_slow(&this, base, 0);
}
EXPORT_SYMBOL(lookup_one_len);