Skip to content

Commit

Permalink
dmu_redact.c does not call bqueue_destroy
Browse files Browse the repository at this point in the history
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 openzfs#12118
  • Loading branch information
lundman authored and behlendorf committed Aug 23, 2021
1 parent ab48081 commit 958f514
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions module/zfs/dmu_redact.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ perform_thread_merge(bqueue_t *q, uint32_t num_threads,
avl_remove(&end_tree, &redact_nodes[i]);
kmem_free(redact_nodes[i].record,
sizeof (struct redact_record));
bqueue_destroy(&thread_args[i].q);
}

avl_destroy(&start_tree);
Expand Down Expand Up @@ -1164,6 +1165,7 @@ dmu_redact_snap(const char *snapname, nvlist_t *redactnvl,
(void) thread_create(NULL, 0, redact_merge_thread, rmta, 0, curproc,
TS_RUN, minclsyspri);
err = perform_redaction(os, new_rl, rmta);
bqueue_destroy(&rmta->q);
kmem_free(rmta, sizeof (struct redact_merge_thread_arg));

out:
Expand Down

0 comments on commit 958f514

Please sign in to comment.