seq_hlist_next_rcu(9)
β¨ 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 nowheadβ the head of the hlist π the starting point of the whole thingpposβ 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:
seq_open(9)seq_read(9)seq_lseek(9)seq_release(9)seq_escape_mem(9)seq_mangle_path(9)seq_path(9)seq_file_path(9)seq_put_decimal_ull_width(9)seq_put_hex_ll(9)seq_write(9)seq_pad(9)seq_hlist_start(9)seq_hlist_start_head(9)seq_hlist_next(9)seq_hlist_start_rcu(9)seq_hlist_start_head_rcu(9)seq_hlist_start_percpu(9)seq_hlist_next_percpu(9)
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
- 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