/* Locks for individual tree nodes */
unsigned int node_lock_count;
db_nodelock_t *node_locks;
- qpcnode_t *origin_node;
dns_stats_t *rrsetstats; /* cache DB only */
isc_stats_t *cachestats; /* cache DB only */
isc_stats_t *gluecachestats; /* zone DB only */
}
/* Handle easy and typical case first. */
- if (!node->dirty && (node->data != NULL || node == qpdb->origin_node)) {
+ if (!node->dirty && node->data != NULL) {
goto unref;
}
write_locked = true;
}
- if (node->data != NULL || node == qpdb->origin_node) {
+ if (node->data != NULL) {
goto restore_locks;
}
unsigned int i;
unsigned int inactive = 0;
- if (qpdb->origin_node != NULL) {
- qpcnode_detach(&qpdb->origin_node);
- }
-
/*
* Even though there are no external direct references, there still
* may be nodes in use.
return mu.leaves;
}
-static isc_result_t
-getoriginnode(dns_db_t *db, dns_dbnode_t **nodep DNS__DB_FLARG) {
- qpcache_t *qpdb = (qpcache_t *)db;
- qpcnode_t *onode = NULL;
- isc_result_t result = ISC_R_SUCCESS;
-
- REQUIRE(VALID_QPDB(qpdb));
- REQUIRE(nodep != NULL && *nodep == NULL);
-
- /* Note that the access to origin_node doesn't require a DB lock */
- onode = (qpcnode_t *)qpdb->origin_node;
- if (onode != NULL) {
- newref(qpdb, onode, isc_rwlocktype_none,
- isc_rwlocktype_none DNS__DB_FLARG_PASS);
- *nodep = (dns_dbnode_t *)qpdb->origin_node;
- } else {
- result = ISC_R_NOTFOUND;
- }
-
- return result;
-}
-
static void
locknode(dns_db_t *db, dns_dbnode_t *node, isc_rwlocktype_t type) {
qpcache_t *qpdb = (qpcache_t *)db;
.addrdataset = qpcache_addrdataset,
.deleterdataset = qpcache_deleterdataset,
.nodecount = nodecount,
- .getoriginnode = getoriginnode,
.getrrsetstats = getrrsetstats,
.setcachestats = setcachestats,
.setservestalettl = setservestalettl,