Better assertions for worklist

Nodes on the worklist are never nexus nodes.

Conflicts:
	src/node.c
parent 5d0fdbc4
...@@ -839,15 +839,14 @@ worklist_push(struct req *req, struct bytes_tree *tree, ...@@ -839,15 +839,14 @@ worklist_push(struct req *req, 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 = req->wrk;
parent->nexus.req->wrk = req->wrk; else
else assert (parent->nexus.req->wrk == req->wrk);
assert (parent->nexus.req->wrk == req->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