seq_hlist_next_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ seq_hlist_next_rcu ✨

okay bestie, welcome to the Kernel API Manual β€” this is the page for seq_hlist_next_rcu(9), and it's literally about moving to the next spot in an hlist that's protected by RCU πŸ¦‹


🌸 NAME 🌸

seq_hlist_next_rcu β€” move to the next position of the hlist protected by RCU πŸ’…


✨ SYNOPSIS ✨

struct hlist_node * seq_hlist_next_rcu (void *v , struct hlist_head *head , loff_t *ppos );

like, that's the whole signature, no cap πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” the current iterator πŸŒ€ like, where you're at right now
  • head β€” the head of the hlist 🌈 the starting point of the whole thing
  • ppos β€” the current position πŸ“ the position tracker, bestie

πŸ’– DESCRIPTION πŸ’–

So this one gets called at seq_file->op->next. That's the vibe β€” it's the "next" callback of your seq_file ops, doing its little traversal thing ✨

Here's the important part, and I need you to hear me on this: this list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives β€” like hlist_add_head_rcu β€” as long as the traversal is guarded by rcu_read_lock. πŸ”’

fr fr, that rcu_read_lock guard is not optional. concurrent-safe only counts with the guard, so don't be out here skipping it 😭

🫢 SEE ALSO 🫢

Kernel file ./fs/seq_file.c plus this whole little friend group of seq helpers:


aaaand that's the page, bestie πŸ’œ this one lives in ./fs, dated October 2026 β€” mwah, go read the whole family of seq_hlist_* friends, they all slay 🌟

πŸ“¦ where this page comes from