Commit eb805e8e authored by Nils Goroll's avatar Nils Goroll

no, I was wrong regarding task_fini() again

ref: 5a03b1ef

we do need to differentiate the cases here, depending on which one, we
need to fini the task before or after some other action.
parent fa14ec02
......@@ -940,12 +940,15 @@ ved_task(struct worker *wrk, void *priv)
req->transport_priv = NULL;
pesi_destroy(&pesi);
req_fini(&req, wrk);
AZ(pesi);
task_fini(pesi_tree, pesi);
break;
case T_SUBREQ:
assert (node->type == T_SUBREQ);
// XXX MAKE EFFICIENT
// WOULD BE BETTER TO ONLY INSERT NODE WHEN READY
assert(pesi == req->transport_priv);
task_fini(pesi_tree, pesi);
Lck_Lock(&pesi_tree->tree->tree_lock);
node->subreq.done = 1;
AZ(pthread_cond_signal(&node->subreq.cond));
......@@ -978,13 +981,12 @@ ved_task(struct worker *wrk, void *priv)
Lck_Lock(&pesi_tree->tree->tree_lock);
set_closed(pesi_tree->tree, node);
Lck_Unlock(&pesi_tree->tree->tree_lock);
AZ(pesi);
task_fini(pesi_tree, pesi);
break;
default:
INCOMPL();
}
CHECK_OBJ_ORNULL(pesi, PESI_MAGIC);
task_fini(pesi_tree, pesi);
}
/*--------------------------------------------------------------------*/
......
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