Page MenuHomeFreeBSD

pctrie: correct iter node after node allocation
ClosedPublic

Authored by dougm on Jun 26 2025, 6:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 12, 8:41 PM
Unknown Object (File)
Sun, Oct 12, 8:41 PM
Unknown Object (File)
Sun, Oct 12, 8:40 PM
Unknown Object (File)
Sun, Oct 12, 9:06 AM
Unknown Object (File)
Thu, Oct 9, 3:35 PM
Unknown Object (File)
Wed, Oct 8, 2:43 AM
Unknown Object (File)
Fri, Sep 26, 8:22 PM
Unknown Object (File)
Mon, Sep 22, 1:53 AM
Subscribers

Details

Summary

Usually, a pctrie_iter operation leaves the iterator node pointing to the last pctrie_node on the path to the found, or inserted, or removed leaf. However, that is not the case when inserting a leaf causes the allocation of a new pctrie node. In that case, the iterator node is left pointing to the parent of the allocated node, and not to the newly allocated node itself, the parent of the just-inserted leaf. Correct this anomaly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable