Commit 063a4a82 authored by Bob Halley's avatar Bob Halley
Browse files

Since rollback_node() no longer frees rdatasets, we must mark the node as

dirty if anything was rolled back, because otherwise the node cleaning
routine will not run when the node reference count becomes 0.
parent a7fbdbf0
......@@ -439,6 +439,7 @@ free_rdataset(isc_mem_t *mctx, rdatasetheader_t *rdataset) {
static inline void
rollback_node(dns_rbtnode_t *node, rbtdb_serial_t serial) {
rdatasetheader_t *header, *dcurrent;
isc_boolean_t make_dirty = ISC_FALSE;
/*
* Caller must hold the node lock.
......@@ -450,15 +451,21 @@ rollback_node(dns_rbtnode_t *node, rbtdb_serial_t serial) {
* will be cleaned up; until that time, they will be ignored.
*/
for (header = node->data; header != NULL; header = header->next) {
if (header->serial == serial)
if (header->serial == serial) {
header->attributes |= RDATASET_ATTR_IGNORE;
make_dirty = ISC_TRUE;
}
for (dcurrent = header->down;
dcurrent != NULL;
dcurrent = dcurrent->down) {
if (dcurrent->serial == serial)
if (dcurrent->serial == serial) {
dcurrent->attributes |= RDATASET_ATTR_IGNORE;
make_dirty = ISC_TRUE;
}
}
}
if (make_dirty)
node->dirty = 1;
}
static inline void
......
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