__mt_destroy(9)
π
__mt_destroy(9) β like, the Kernel API Manual page, bestie
okay so before we even start: yes this is a page from the Kernel API Manual, section 9, and yes it's short. She's a little three-line baddie and honestly? iconic for that. Let's get into it β¨
πΈ NAME πΈ
__mt_destroy β walk and free all nodes of a locked maple tree.
that's it. that's the whole job. she walks the tree, she frees the nodes, she leaves. main character energy fr fr π
π SYNOPSIS π
void __mt_destroy (struct maple_tree *mt );
literally one function, no return value, takes one pointer. clean. minimal. ate. π
π¦ ARGUMENTS π¦
mtβ the maple tree π that's the one you're about to walk through and free node-by-node. she's the whole reason we're here.
β οΈ NOTE β οΈ
Does not handle locking. π«Ά
and bestie I need you to read that again. this function does not handle locking. it does not take a lock, it does not release a lock, it does not think about locks. the name literally says locked maple tree β so whoever calls this is the one responsible for the locking situation. don't come crying to __mt_destroy about it, she is booked and busy freeing nodes ππ
π SEE ALSO π
okay this is the part where the manpage just... lists the entire extended family. every single cousin. no cap, here's the whole group chat π
mas_prealloc_calc(9)mas_wr_preallocate(9)mas_insert(9)mas_alloc_cyclic(9)mas_walk(9)mte_dead_walk(9)mt_free_walk(9)mas_store(9)mas_store_gfp(9)mas_store_prealloc(9)mas_preallocate(9)mas_next(9)mas_next_range(9)mt_next(9)mas_prev(9)mas_prev_range(9)mt_prev(9)mas_pause(9)mas_find_setup(9)mas_find(9)mas_find_range(9)mas_find_rev_setup(9)mas_find_rev(9)mas_find_range_rev(9)mas_erase(9)mas_nomem(9)mas_nomem_nofail(9)mtree_load(9)mtree_store_range(9)mtree_store(9)mtree_insert_range(9)mtree_insert(9)mtree_alloc_cyclic(9)mtree_erase(9)__mt_dup(9)mtree_dup(9)mtree_destroy(9)mt_find(9)mt_find_after(9)
like I said. the entire family. thirty-nine (39) of them. go read them all, I'll wait π§π
also the kernel file for this whole maple tree situation lives at ./lib/maple_tree.c β that's the source, that's where the magic happens, go look if you're nosy (I'm nosy) π
alright that's the page!! short, sweet, and she knows exactly what she is π written in October 2026 out of the kernel ./lib directory, part of the Kernel API Manual β section 9, mwah π slay and stay locked, bestie πβ¨
π¦ 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