Better assertions for worklist

Nodes on the worklist are never nexus nodes.
parent e0b0404a
...@@ -856,15 +856,14 @@ worklist_push(struct vdp_ctx *vdx, struct bytes_tree *tree, ...@@ -856,15 +856,14 @@ worklist_push(struct vdp_ctx *vdx, struct bytes_tree *tree,
AN(node); AN(node);
while (node) { while (node) {
parent = node->parent; parent = node->parent;
AN(parent);
next = VSTAILQ_NEXT(node, unpend); next = VSTAILQ_NEXT(node, unpend);
if (parent != NULL) { assert (parent->type == T_NEXUS);
assert (parent->type == T_NEXUS); if (parent->nexus.req->wrk == NULL)
if (parent->nexus.req->wrk == NULL) parent->nexus.req->wrk = vdx->wrk;
parent->nexus.req->wrk = vdx->wrk; else
else assert (parent->nexus.req->wrk == vdx->wrk);
assert (parent->nexus.req->wrk == vdx->wrk);
}
// not using assert_node: it needs locking // not using assert_node: it needs locking
assert(node->state == ST_UNPENDING); assert(node->state == ST_UNPENDING);
......
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