list_for_each_entry_from(9)
π NAME π
list_for_each_entry_from β bestie, this is the one that iterates over a list of a given type from the current point β¨ not from the start, from wherever you already are, and that's the whole vibe π«Ά
β¨ SYNOPSIS β¨
list_for_each_entry_from (pos , head , member );
That's it, that's the whole call, no cap π
π ARGUMENTS π
posβ the type * to use as a loop cursor. yes it's your little pointer bestie that walks the list for you πheadβ the head for your list. the main character of the whole structure fr fr πmemberβ the name of thelist_headwithin the struct. gotta tell it which field is the list glue π§
π¦ DESCRIPTION π¦
Okay so picture this: you've got a list of a given type, you're already standing somewhere in the middle of it, and you do not want to start over from the beginning like some kind of rookie π
list_for_each_entry_from iterates over that list of given type, continuing from current position. that's the whole thing, that's the slay π
lowkey the important part is continuing β it picks up right where you are instead of rewinding. iykyk π¦
πΈ SEE ALSO πΈ
Kernel file ./tools/include/linux/list.h β and honestly the whole friend group is here, go say hi π
list_add(9)list_add_tail(9)list_replace(9)list_del_init(9)list_move(9)list_move_tail(9)list_is_first(9)list_is_last(9)list_empty(9)list_empty_careful(9)list_rotate_left(9)list_is_singular(9)list_cut_position(9)list_splice(9)list_splice_tail(9)list_splice_init(9)list_splice_tail_init(9)list_entry(9)list_first_entry(9)list_last_entry(9)list_first_entry_or_null(9)list_last_entry_or_null(9)list_next_entry(9)list_prev_entry(9)list_for_each(9)list_for_each_prev(9)list_for_each_safe(9)list_for_each_prev_safe(9)list_for_each_entry(9)list_for_each_entry_reverse(9)list_prepare_entry(9)list_for_each_entry_continue(9)list_for_each_entry_continue_reverse(9)list_for_each_entry_safe(9)list_for_each_entry_safe_continue(9)list_for_each_entry_safe_from(9)list_for_each_entry_safe_reverse(9)list_safe_reset_next(9)hlist_for_each_entry(9)hlist_for_each_entry_continue(9)hlist_for_each_entry_from(9)hlist_for_each_entry_safe(9)list_del_range(9)list_for_each_from(9)
and that's the page bestie!! π this one dropped in October 2026, lives under the source path ./tools/include/linux, and it's part of the Kernel API Manual β the manual page is literally called list_for_each_entry_from(9) in case you forgot already π go forth and iterate from wherever you're standing, periodt ππ₯
π¦ 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