Commit 44cdd7c2 authored by Nils Goroll's avatar Nils Goroll

fini nexus earlier

parent 8736cbe1
......@@ -1567,7 +1567,7 @@ static int
bytes_push_worklist(struct req *req, struct bytes_tree *tree,
struct node_head *work)
{
struct node *node, *next;
struct node *node, *next, *parent;
int retval = 0;
node = VSTAILQ_FIRST(work);
......@@ -1612,21 +1612,25 @@ bytes_push_worklist(struct req *req, struct bytes_tree *tree,
*/
VSTAILQ_FOREACH(node, work, unpend) {
switch (node->type) {
case T_FINAL:
fini_final(req, node);
break;
case T_SUBREQ:
fini_subreq(req, node);
break;
case T_DATA:
fini_data(req, node);
break;
case T_CRC:
break;
default:
INCOMPL();
}
node_fini(req, node);
if (VSTAILQ_NEXT(node, sibling) != NULL)
continue;
parent = node->parent;
/* don't touch the root */
if (parent->parent == NULL)
continue;
/*
* fini the now unneeded parent ASAP
*
* this is separate from set_delived() because
* - set_delivered() happens under the lock
* - set_delivered() can also be called from
* within the parent's FSM
*/
node_fini(req, parent);
}
return (retval);
......
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