dmu_redact.c does not call bqueue_destroy

Ensure all calls to bqueue_init() has a corresponding call to bqueue_destroy()

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Jorgen Lundman <lundman@lundman.net>
Closes #12118
This commit is contained in:
Jorgen Lundman 2021-07-20 23:08:45 +09:00 committed by GitHub
parent 23c13c7e80
commit e04210035e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -816,6 +816,7 @@ perform_thread_merge(bqueue_t *q, uint32_t num_threads,
avl_remove(&end_tree, &redact_nodes[i]); avl_remove(&end_tree, &redact_nodes[i]);
kmem_free(redact_nodes[i].record, kmem_free(redact_nodes[i].record,
sizeof (struct redact_record)); sizeof (struct redact_record));
bqueue_destroy(&thread_args[i].q);
} }
avl_destroy(&start_tree); avl_destroy(&start_tree);
@ -1164,6 +1165,7 @@ dmu_redact_snap(const char *snapname, nvlist_t *redactnvl,
(void) thread_create(NULL, 0, redact_merge_thread, rmta, 0, curproc, (void) thread_create(NULL, 0, redact_merge_thread, rmta, 0, curproc,
TS_RUN, minclsyspri); TS_RUN, minclsyspri);
err = perform_redaction(os, new_rl, rmta); err = perform_redaction(os, new_rl, rmta);
bqueue_destroy(&rmta->q);
kmem_free(rmta, sizeof (struct redact_merge_thread_arg)); kmem_free(rmta, sizeof (struct redact_merge_thread_arg));
out: out: