xas_free_nodes(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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