Commit 90d21f80 authored by Nils Goroll's avatar Nils Goroll

hopefully get the subreq task_fini dance right now

Ref: eb805e8e

we cannot signal task_fini after posting subreq.done, because then we
race the assertion that all tasks are done when we are done delivering.

But we also cannot do it the other way around because then the
assertion that subreqs are done when all tasks are finished, does not
hold.

So the right option should be to do both under the tree lock.
parent 1481bd02
......@@ -217,8 +217,8 @@ vped_task(struct worker *wrk, void *priv)
case T_SUBREQ:
assert (node->type == T_SUBREQ);
assert(pesi == req->transport_priv);
task_fini(pesi_tree, pesi);
Lck_Lock(&pesi_tree->tree->tree_lock);
task_fini(pesi_tree, pesi);
node->subreq.done = 1;
AZ(pthread_cond_signal(&node->subreq.cond));
Lck_Unlock(&pesi_tree->tree->tree_lock);
......
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