From 8f6aaa7230b8d40c2acadc9c05c384052522af76 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Wed, 27 Nov 2019 20:00:26 +1100 Subject: [PATCH] add comments 'tree_lock(write) must be held' --- lib/dns/rbtdb.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c index efc5a7c895..e5646f3aaa 100644 --- a/lib/dns/rbtdb.c +++ b/lib/dns/rbtdb.c @@ -1728,6 +1728,9 @@ clean_zone_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node, node->dirty = 0; } +/* + * tree_lock(write) must be held. + */ static void delete_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node) { dns_rbtnode_t *nsecnode; @@ -2652,6 +2655,8 @@ closeversion(dns_db_t *db, dns_dbversion_t **versionp, bool commit) { * E.g. if the wildcard name is "*.sub.example." then we * must ensure that "sub.example." exists and is marked as * a wildcard level. + * + * tree_lock(write) must be held. */ static isc_result_t add_wildcard_magic(dns_rbtdb_t *rbtdb, const dns_name_t *name) { @@ -2676,6 +2681,9 @@ add_wildcard_magic(dns_rbtdb_t *rbtdb, const dns_name_t *name) { return (ISC_R_SUCCESS); } +/* + * tree_lock(write) must be held. + */ static isc_result_t add_empty_wildcards(dns_rbtdb_t *rbtdb, const dns_name_t *name) { isc_result_t result;