hlist_nulls_del_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hlist_nulls_del_rcu πŸ’…

okay so bestie, welcome to the Kernel API Manual page for hlist_nulls_del_rcu β€” she's a kernel function, she's from ./include/linux, and she is literally the moment πŸ’–


✨ NAME ✨

hlist_nulls_del_rcu β€” deletes an entry from a hash list without re-initialization. no re-init, no problem, she just leaves πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

void hlist_nulls_del_rcu (struct hlist_nulls_node *n );

🌸 ARGUMENTS 🌸

  • n β€” the element to delete from the hash list. that's her, that's the girl you're removing πŸ‘‘

πŸ’€ NOTE πŸ’€

okay this is the part where you actually have to pay attention, bestie, because it's giving important caveats 😭

hlist_nulls_unhashed on entry does not return true after this. nope. the entry is in an undefined state. that's not a vibe, that's just facts. she's undefined now, periodt.

it is useful for RCU based lockfree traversal tho β€” that's literally her whole purpose ✨

in particular πŸ‘‡ it means that we can not poison the forward pointers that may still be used for walking the hash list. so don't go trying to poison them, she said no πŸ™ˆ

⚠️ the caller must take whatever precautions are necessary (such as holding appropriate locks) to avoid racing with another list-mutation primitive β€” think hlist_nulls_add_head_rcu or hlist_nulls_del_rcu β€” running on this same list. so like, protect yourself. lock it up. πŸ”’

but πŸ’… however β€” it is perfectly legal to run concurrently with the _rcu list-traversal primitives, such as hlist_nulls_for_each_entry. so reading while deleting? totally fine, iconic, no notes.


πŸ‘€ SEE ALSO πŸ‘€

kernel file ./include/linux/rculist_nulls.h, plus the whole friend group 🫢:


and that's the whole page, bestie!! πŸŽ€βœ¨ this one lives in ./include/linux, dated October 2026, and she goes by hlist_nulls_del_rcu(9) β€” lowkey a whole icon, no cap πŸ’œπŸ¦‹ slay

πŸ“¦ where this page comes from