radix_tree_tag_clear(9)
π 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 π
radix_tree_find_next_bit(9)radix_tree_shrink(9)__radix_tree_create(9)radix_tree_insert(9)__radix_tree_lookup(9)radix_tree_lookup_slot(9)radix_tree_lookup(9)__radix_tree_replace(9)radix_tree_replace_slot(9)radix_tree_iter_replace(9)radix_tree_tag_set(9)radix_tree_iter_tag_clear(9)radix_tree_tag_get(9)radix_tree_next_chunk(9)radix_tree_gang_lookup(9)radix_tree_gang_lookup_tag(9)radix_tree_gang_lookup_tag_slot(9)radix_tree_iter_delete(9)radix_tree_delete_item(9)radix_tree_delete(9)radix_tree_tagged(9)idr_preload(9)idr_destroy(9)
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
- 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