HomeFreeBSD

pctrie: iter_remove check from panic to KASSERT

Description

pctrie: iter_remove check from panic to KASSERT

pctrie_iter_remove checks to see if the thing the iterator points to
is actually there, and panics if it is not. This panic would likely
indicate the same iterator had been used for removal twice, without
advancing the iterator in-between. This test takes a bit of time, and
as it indicates a programmer error rather than some external
condition, it is better handled as a KASSERT. This means with KASSERTs
disabled, a wee bit of time is saved.

Reviewed by: alc, markj
Differential Revision: https://reviews.freebsd.org/D49015

Details

Provenance
dougmAuthored on Feb 16 2025, 7:05 PM
Reviewer
alc
Differential Revision
D49015: pctrie: move iter_remove check from panic to KASSERT
Parents
rG19f202f859b1: sdhci: Fixes for sdhci_fdt_rockchip.c
Branches
Unknown
Tags
Unknown