Merge branch '3641-cleanup-dead_nodes-from-prune_tree' into 'main'

Cleanup the dead nodes when pruning the tree

Closes #3641

See merge request isc-projects/bind9!7012
This commit is contained in:
Ondřej Surý 2022-11-02 18:08:42 +00:00
commit 7f19af2622
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,6 @@
6012. [func] Cleanup the dead nodes while pruning the tree.
[GL #3641]
6011. [func] Refactor the privilege setting part of named_os unit
to make libcap on Linux mandatory and use setreuid
and setregid if available. [GL #3583]

View file

@ -2254,6 +2254,12 @@ prune_tree(isc_task_t *task, isc_event_t *event) {
decrement_reference(rbtdb, node, 0, &nlocktype, &tlocktype,
true);
/*
* We have both write locks, we might as well do a light
* dead nodes cleaning.
*/
cleanup_dead_nodes(rbtdb, locknum);
if (parent != NULL && parent->down == NULL) {
/*
* node was the only down child of the parent and has