]> git.ipfire.org Git - thirdparty/bind9.git/commit
Clarify reference counting in QP databases
authorEvan Hunt <each@isc.org>
Thu, 30 Jan 2025 22:42:57 +0000 (14:42 -0800)
committerOndřej Surý <ondrej@isc.org>
Fri, 31 Jan 2025 04:52:13 +0000 (05:52 +0100)
commit5300eebc9e68ab0f328831e5cd3849d9cf06ae2a
tree5e870fcf721a8dbbb3f4cd61d7cdf92f913ace1c
parent7dab6cdfbc26bfa3aa37168c382563047d4dee95
Clarify reference counting in QP databases

Change the names of the node reference counting functions
and add comments to make the mechanism easier to understand:

- newref() and decref() are now called qpcnode_acquire()/
  qpznode_acquire() and qpcnode_release()/qpznode_release()
  respectively; this reflects the fact that they modify both
  the internal and external reference counters for a node.

- qpcnode_newref() and qpznode_newref() are now called
  qpcnode_erefs_increment() and qpznode_erefs_increment(), and
  qpcnode_decref() and qpznode_decref() are now called
  qpcnode_erefs_decrement() and qpznode_erefs_decrement(),
  to reflect that they only increase and decrease the node's
  external reference counters, not internal.

(cherry picked from commit d4f791793e2db06f63243eebb7c1a1de66d5792c)
lib/dns/qpcache.c
lib/dns/qpzone.c