radix_tree_tag_clear(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… radix_tree_tag_clear(9) πŸ’…

ok so you're in the Kernel API Manual bestie, and we're about to clear a tag on a radix tree node. it's giving housekeeping, it's giving "let me un-mark this real quick" β€” and honestly? iconic behavior. let's get into it 🫢


✨ NAME ✨

radix_tree_tag_clear β€” clear a tag on a radix tree node

like literally, that's the whole job. you point at a spot in the tree and you're like "mmm not tagged anymore πŸ’…"


🌸 SYNOPSIS 🌸

void * radix_tree_tag_clear (struct radix_tree_root *root , unsigned
long index , unsigned int tag );

three things go in, one pointer comes out. no cap, that's it. πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

  • root β€” the radix tree root, aka the main character. this is where the whole tree starts, so like… yeah, you need it.
  • index β€” the index key. it's the address of the thing you're clearing the tag on. think of it as the GPS coordinate of your little leaf node πŸ“
  • tag β€” the tag index. WHICH tag are we clearing? there's a whole menu of them, and you gotta pick one.

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the vibe: you're clearing the search tag β€” and heads up, that tag must be < RADIX_TREE_MAX_TAGS β€” the one corresponding to index in the radix tree.

and then here's the part that's lowkey the coolest: if clearing that tag causes the leaf node to have no tags set at all, then it goes and clears the tag in the next-to-leaf node, and then the next one, etc. it just keeps climbing up the tree, tidying as it goes. like it's not gonna leave a mess behind, periodt. 🧹✨

Returns the address of the tagged item on success, else NULL. ie: it has the same return value and semantics as radix_tree_lookup. so if you know that one, you already know this one, iykyk πŸ’œ

no cap: NULL on failure is a real possibility, so pls actually check it before you go dereferencing things πŸ™ˆ

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./lib/radix-tree.c, plus the whole radix tree friend group πŸ‘‘


that's the whole page bestie, go clear some tags πŸ’–

sign-off szn: this little beauty lives in ./lib, dated October 2026, and it's filed under radix_tree_tag_clear(9) if you ever need to find it again. mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from