From: Ondřej Surý Date: Wed, 2 Jul 2025 16:19:50 +0000 (+0200) Subject: The nodefullname doesn't need a read lock to access .name X-Git-Tag: v9.21.12~43^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d555cb97040a7b2c253c4c11ed822a53c2aff7b7;p=thirdparty%2Fbind9.git The nodefullname doesn't need a read lock to access .name The qpznode->name is constant - assigned when the node is created and it is immutable, so there's no reason to have it locked at all. --- diff --git a/lib/dns/qpzone.c b/lib/dns/qpzone.c index 8e6fa99a39c..139e0a19547 100644 --- a/lib/dns/qpzone.c +++ b/lib/dns/qpzone.c @@ -5144,18 +5144,12 @@ qpzone_deleterdataset(dns_db_t *db, dns_dbnode_t *dbnode, static isc_result_t nodefullname(dns_dbnode_t *node, dns_name_t *name) { - qpznode_t *qpnode = (qpznode_t *)node; - isc_rwlocktype_t nlocktype = isc_rwlocktype_none; - isc_rwlock_t *nlock = NULL; - REQUIRE(node != NULL); REQUIRE(name != NULL); - nlock = qpzone_get_lock(qpnode); + qpznode_t *qpnode = (qpznode_t *)node; - NODE_RDLOCK(nlock, &nlocktype); dns_name_copy(&qpnode->name, name); - NODE_UNLOCK(nlock, &nlocktype); return ISC_R_SUCCESS; }