Commit 6f0d7630 authored by Daniel Salzman's avatar Daniel Salzman

zone: use NULL trie_cb for qp-trie COW operations

parent b1941884
......@@ -441,10 +441,10 @@ void update_rollback(apply_ctx_t *ctx)
zone_tree_free(&ctx->node_ptrs);
zone_tree_free(&ctx->nsec3_ptrs);
trie_cow_rollback(ctx->contents->nodes->cow, trie_cb_noop, NULL);
trie_cow_rollback(ctx->contents->nodes->cow, NULL, NULL);
ctx->contents->nodes->cow = NULL;
if (ctx->contents->nsec3_nodes != NULL) {
trie_cow_rollback(ctx->contents->nsec3_nodes->cow, trie_cb_noop, NULL);
trie_cow_rollback(ctx->contents->nsec3_nodes->cow, NULL, NULL);
ctx->contents->nsec3_nodes->cow = NULL;
}
......@@ -462,10 +462,10 @@ void update_free_zone(zone_contents_t *contents)
return;
}
trie_cow_commit(contents->nodes->cow, trie_cb_noop, NULL);
trie_cow_commit(contents->nodes->cow, NULL, NULL);
contents->nodes->cow = NULL;
if (contents->nsec3_nodes != NULL) {
trie_cow_commit(contents->nsec3_nodes->cow, trie_cb_noop, NULL);
trie_cow_commit(contents->nsec3_nodes->cow, NULL, NULL);
contents->nsec3_nodes->cow = NULL;
}
......
......@@ -57,14 +57,6 @@ zone_tree_t *zone_tree_create(bool use_binodes)
return t;
}
void trie_cb_noop(trie_val_t val, const unsigned char *key, size_t len, void *d)
{
(void)val;
(void)key;
(void)len;
(void)d;
}
zone_tree_t *zone_tree_dup(zone_tree_t *from)
{
zone_tree_t *to = calloc(1, sizeof(*to));
......@@ -72,7 +64,7 @@ zone_tree_t *zone_tree_dup(zone_tree_t *from)
return to;
}
to->flags = from->flags ^ ZONE_TREE_BINO_SECOND;
from->cow = trie_cow(from->trie, trie_cb_noop, NULL);
from->cow = trie_cow(from->trie, NULL, NULL);
to->cow = from->cow;
to->trie = trie_cow_new(to->cow);
if (to->trie == NULL) {
......
......@@ -56,8 +56,6 @@ typedef struct {
*/
zone_tree_t *zone_tree_create(bool use_binodes);
void trie_cb_noop(trie_val_t val, const unsigned char *key, size_t len, void *d);
zone_tree_t *zone_tree_dup(zone_tree_t *from);
/*!
......
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