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,
AN(node);
while (node) {
parent = node->parent;
AN(parent);
next = VSTAILQ_NEXT(node, unpend);
if (parent != NULL) {
assert (parent->type == T_NEXUS);
if (parent->nexus.req->wrk == NULL)
parent->nexus.req->wrk = vdx->wrk;
else
assert (parent->nexus.req->wrk == vdx->wrk);
}
assert (parent->type == T_NEXUS);
if (parent->nexus.req->wrk == NULL)
parent->nexus.req->wrk = vdx->wrk;
else
assert (parent->nexus.req->wrk == vdx->wrk);
// not using assert_node: it needs locking
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