xas_free_nodes(9)
π xas_free_nodes(9) π
okay so welcome to the Kernel API Manual, bestie β today's main character is xas_free_nodes(9) and honestly? she's a little chaotic but she slays π«Ά
β¨ NAME β¨
xas_free_nodes β free this node and all nodes that it references π
πΈ SYNOPSIS πΈ
void xas_free_nodes (struct xa_state *xas , struct xa_node *top );
literally that's it, that's the whole signature. no cap.
π ARGUMENTS π
xasβ array operation state π« (the vibe/context for what we're doing here)topβ the node to free ποΈ
π¦ DESCRIPTION π¦
so here's the tea π: this node has been removed from the tree. like, gone, uninvited, no longer on the guest list.
now we gotta free it β and not just it, all of its subnodes too π the whole little friend group goes. but wait, there's a plot twist: there may be RCU walkers out there still holding references into the tree π so we can't just yank stuff out from under them like a feral gremlin. instead, we must replace all entries with retry markers β¨ so those walkers know to try again. etiquette!! we have it!!
ngl this one's about cleanup + being polite to concurrent readers. both iconic behaviors π
π SEE ALSO π
kernel file ./lib/xarray.c, plus the whole extended universe bestie:
xas_load(9), xas_nomem(9), xas_create_range(9), xas_store(9), xas_get_mark(9), xas_set_mark(9), xas_clear_mark(9), xas_init_marks(9), xas_split_alloc(9), xas_split(9), xas_try_split_min_order(9), xas_try_split(9), xas_pause(9), xas_find(9), xas_find_marked(9), xas_find_conflict(9), xa_load(9), __xa_erase(9), xa_erase(9), __xa_store(9), xa_store(9), __xa_cmpxchg(9), __xa_insert(9), xa_store_range(9), xas_get_order(9), xa_get_order(9), __xa_alloc(9), __xa_alloc_cyclic(9), __xa_set_mark(9), __xa_clear_mark(9), xa_get_mark(9), xa_set_mark(9), xa_clear_mark(9), xa_find(9), xa_find_after(9), xa_extract(9), xa_delete_node(9), xa_destroy(9)
and that's the whole page, periodt π
cute lil sign-off: this one lives in ./lib, dated October 2026, and yes she's a xas_free_nodes(9) girlie through and through πβ mwah π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms