radix_tree_deref_slot(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to radix_tree_deref_slot(9) from the Kernel API Manual ๐Ÿ’– this is the little โ€œdereference a slotโ€ moment, and it is giving โ€œI know my tree locksโ€ energy. Periodt.

โœจ NAME โœจ

radix_tree_deref_slot โ€” dereference a slot. Thatโ€™s the whole name, and she ate. ๐ŸŽ€

๐Ÿซถ SYNOPSIS ๐Ÿซถ

void * radix_tree_deref_slot (void __rcu **slot );

๐ŸŒธ ARGUMENTS ๐ŸŒธ

  • slot โ€” the slot pointer, returned by radix_tree_lookup_slot. Thatโ€™s your lil handle, bestie; donโ€™t invent your own. ๐Ÿ’…

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

Okay so hereโ€™s the vibe check: this function is for use with radix_tree_lookup_slot โ€” theyโ€™re a matching set, iykyk. ๐Ÿฆ‹

The caller must hold the tree at least read locked across slot lookup and dereference. Like, across both steps, no gaps, no โ€œoops I forgot the lockโ€ main character moments. ๐Ÿ˜ญ

Thatโ€™s not required if the write lock is held (ie. items cannot be concurrently inserted). So if you already have the write lock, youโ€™re chilling. ๐Ÿซถ

If only the read lock is held, radix_tree_deref_retry must be used to confirm validity of the pointer. Do not skip this, bestie โ€” itโ€™s literally the validity check. ๐Ÿ’€

๐Ÿ’– RETURN ๐Ÿ’–

The return is the entry stored in that slot. Thatโ€™s what you get, and itโ€™s iconic. ๐Ÿ‘‘

๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

Go touch grass in these related pages and files, fr fr:


mwah ๐Ÿ’‹ โ€” this pageโ€™s source/version is ./include/linux, and itโ€™s dated October 2026; itโ€™s a Kernel API Manual situation, and thatโ€™s the cute lil sign-off. ๐ŸŽ€โœจ

๐Ÿ“ฆ where this page comes from