mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
chg: dev: 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. Merge branch 'ondrej/nodefullname-no-read-lock' into 'main' See merge request isc-projects/bind9!10686
This commit is contained in:
commit
a1c00cbbe3
@ -5144,18 +5144,12 @@ qpzone_deleterdataset(dns_db_t *db, dns_dbnode_t *dbnode,
|
|||||||
|
|
||||||
static isc_result_t
|
static isc_result_t
|
||||||
nodefullname(dns_dbnode_t *node, dns_name_t *name) {
|
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(node != NULL);
|
||||||
REQUIRE(name != 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);
|
dns_name_copy(&qpnode->name, name);
|
||||||
NODE_UNLOCK(nlock, &nlocktype);
|
|
||||||
|
|
||||||
return ISC_R_SUCCESS;
|
return ISC_R_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user