]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove unused dns_view_load() and dns_zt_load()
authorMatthijs Mekking <matthijs@isc.org>
Wed, 4 Feb 2026 08:39:25 +0000 (09:39 +0100)
committerMatthijs Mekking <matthijs@isc.org>
Thu, 12 Feb 2026 13:43:13 +0000 (13:43 +0000)
We always load zones asynchronously.

lib/dns/include/dns/view.h
lib/dns/include/dns/zt.h
lib/dns/view.c
lib/dns/zt.c

index ddf51e5f2f9a3f3069921d77cafc71c5a4c7cb9e..9edad1852fcbc390ae96b0ac03953dc5b28bab17 100644 (file)
@@ -774,28 +774,17 @@ dns_view_findzone(dns_view_t *view, const dns_name_t *name,
  *\li  #ISC_R_NOTFOUND         No matching zone was found.
  */
 
-isc_result_t
-dns_view_load(dns_view_t *view, bool stop, bool newonly);
-
 isc_result_t
 dns_view_asyncload(dns_view_t *view, bool newonly, dns_zt_callback_t *callback,
                   void *arg);
 /*%<
- * Load zones attached to this view.  dns_view_load() loads
- * all zones whose master file has changed since the last
- * load
- *
- * dns_view_asyncload() loads zones asynchronously.  When all zones
+ * Load zones attached to this view asynchronously.  When all zones
  * in the view have finished loading, 'callback' is called with argument
  * 'arg' to inform the caller.
  *
- * If 'stop' is true, stop on the first error and return it.
- * If 'stop' is false (or we are loading asynchronously), ignore errors.
- *
  * If 'newonly' is true load only zones that were never loaded.
  *
  * Requires:
- *
  *\li  'view' is valid.
  */
 
index 733f576f1ee6572cf5c6c27f3ea028559a628acf..1284143ec2cb7b50c2ce68c2c5819be575c9dc49 100644 (file)
@@ -135,25 +135,18 @@ dns_zt_attach(dns_zt_t *zt, dns_zt_t **ztp);
  * \li '*ztp' to be NULL
  */
 
-isc_result_t
-dns_zt_load(dns_zt_t *zt, bool stop, bool newonly);
-
 isc_result_t
 dns_zt_asyncload(dns_zt_t *zt, bool newonly, dns_zt_callback_t alldone,
                 void *arg);
 /*%<
- * Load all zones in the table. If 'stop' is true, stop on the first
- * error and return it. If 'stop' is false, ignore errors.
- *
- * If newonly is set only zones that were never loaded are loaded.
+ * Load all zones in the table asynchronously.  When all zones in the zone
+ * table have finished loaded (or failed due to errors), the caller is
+ * informed by calling 'alldone' with an argument of 'arg'.
  *
- * dns_zt_asyncload() loads zones asynchronously; when all
- * zones in the zone table have finished loaded (or failed due
- * to errors), the caller is informed by calling 'alldone'
- * with an argument of 'arg'.
+ * If 'newonly' is set only zones that were never loaded are loaded.
  *
  * Requires:
- * \li 'zt' to be valid
+ * \li 'zt' to be valid.
  */
 
 isc_result_t
index 753b573d74d6f9a915af38c63ef313e8f66cc671..217a46faacaed6b58581a497a7a48681445876d5 100644 (file)
@@ -1233,24 +1233,6 @@ dns_viewlist_findzone(dns_viewlist_t *list, const dns_name_t *name,
        return ISC_R_NOTFOUND;
 }
 
-isc_result_t
-dns_view_load(dns_view_t *view, bool stop, bool newonly) {
-       isc_result_t result;
-       dns_zt_t *zonetable = NULL;
-
-       REQUIRE(DNS_VIEW_VALID(view));
-
-       rcu_read_lock();
-       zonetable = rcu_dereference(view->zonetable);
-       if (zonetable != NULL) {
-               result = dns_zt_load(zonetable, stop, newonly);
-       } else {
-               result = ISC_R_SUCCESS;
-       }
-       rcu_read_unlock();
-       return result;
-}
-
 isc_result_t
 dns_view_asyncload(dns_view_t *view, bool newonly, dns_zt_callback_t *callback,
                   void *arg) {
index f946a87da1e42a7f66418d437978a59c370778e6..7342fa2f79e9b10c4d08a89577a047075197a881 100644 (file)
@@ -281,24 +281,6 @@ dns_zt_flush(dns_zt_t *zt) {
        atomic_store_release(&zt->flush, true);
 }
 
-static isc_result_t
-load(dns_zone_t *zone, void *uap) {
-       isc_result_t result;
-       result = dns_zone_load(zone, uap != NULL);
-       if (result == DNS_R_CONTINUE || result == ISC_R_LOADING ||
-           result == DNS_R_UPTODATE || result == DNS_R_DYNAMIC)
-       {
-               result = ISC_R_SUCCESS;
-       }
-       return result;
-}
-
-isc_result_t
-dns_zt_load(dns_zt_t *zt, bool stop, bool newonly) {
-       REQUIRE(VALID_ZT(zt));
-       return dns_zt_apply(zt, stop, NULL, load, newonly ? &newonly : NULL);
-}
-
 static void
 loaded_all(struct zt_load_params *params) {
        if (params->loaddone != NULL) {