提交 3781764b 编写于 作者: A Al Viro

proc_fill_cache(): switch to d_alloc_parallel()

... making it usable with directory locked shared
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 61922694
......@@ -1819,12 +1819,17 @@ bool proc_fill_cache(struct file *file, struct dir_context *ctx,
child = d_hash_and_lookup(dir, &qname);
if (!child) {
child = d_alloc(dir, &qname);
if (!child)
goto end_instantiate;
if (instantiate(d_inode(dir), child, task, ptr) < 0) {
dput(child);
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
child = d_alloc_parallel(dir, &qname, &wq);
if (IS_ERR(child))
goto end_instantiate;
if (d_in_lookup(child)) {
int err = instantiate(d_inode(dir), child, task, ptr);
d_lookup_done(child);
if (err < 0) {
dput(child);
goto end_instantiate;
}
}
}
inode = d_inode(child);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册