list_bulk_move_tail(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ list_bulk_move_tail β€” ok so hear me out

bestie. welcome to the Kernel API Manual page for list_bulk_move_tail(9). this is the "grab a chunk of a linked list and yeet it to the end" function and honestly? it's giving choreographer. it just moves the whole squad at once instead of one by one πŸ’…


✨ NAME ✨

list_bulk_move_tail β€” move a subsection of a list to its tail πŸ¦‹

like, a subsection. not the whole thing. a little slice. iconic behavior tbh.


πŸŽ€ SYNOPSIS πŸŽ€

void list_bulk_move_tail (struct list_head *head , struct list_head
*first , struct list_head *last );

(it's a void, so don't go looking for a return value, there isn't one, periodt ✨)


πŸ’– ARGUMENTS πŸ’–

  • head β€” the head that will follow our entry πŸ‘‘ like, after the move, this is what comes right after everything you shifted. it's the destination vibe.
  • first β€” first entry to move 🌸 the beginning of your little squad.
  • last β€” last entry to move 🌈 and yes, it can be the same as first. no cap. if it is, congrats, you're moving exactly one entry and it's a whole party of one.

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea β˜• β€” move all entries between first and including last before head. the word "including" is doing heavy lifting there, don't skip it, last comes along too πŸ’€

⚠️ real talk though: all three entries must belong to the same linked list. if they don't, you're not vibing, you're just wrong. this is a hard requirement, not a suggestion 🚨

that's literally it. that's the whole function. small, efficient, does one thing well β€” main character energy fr fr 🫢


🧚 SEE ALSO 🧚

the whole friend group lives in the kernel file ./include/linux/list.h, and honestly there are so many of them, we're listing every single one because nobody gets left out of the group chat πŸ’œ

LIST_HEAD_INIT(9), LIST_HEAD(9), LIST_HEAD_GUARDED(9), INIT_LIST_HEAD(9), list_add(9), list_add_tail(9), list_add_tail_release(9), list_del(9), list_replace(9), list_replace_init(9), list_swap(9), list_del_init(9), list_move(9), list_move_tail(9), list_is_first(9), list_is_last(9), list_is_head(9), list_empty(9), list_del_init_careful(9), list_empty_careful(9), list_rotate_left(9), list_rotate_to_front(9), list_is_singular(9), list_cut_position(9), list_cut_before(9), list_splice(9), list_splice_tail(9), list_splice_init(9), list_splice_tail_init(9)

the entry-accessor girlies πŸŽ€: list_entry(9), list_first_entry(9), list_last_entry(9), list_first_entry_or_null(9), list_first_entry_or_null_acquire(9), list_last_entry_or_null(9), list_next_entry(9), list_next_entry_circular(9), list_prev_entry(9), list_prev_entry_circular(9)

the iteration squad (yes all of them, don't @ me) 🌈: list_for_each(9), list_for_each_continue(9), list_for_each_prev(9), list_for_each_safe(9), list_for_each_prev_safe(9), list_count_nodes(9), list_entry_is_head(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_from(9), list_for_each_entry_from_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)

and the hlist cousins, who also get an invite πŸ¦‹: hlist_unhashed(9), hlist_unhashed_lockless(9), hlist_empty(9), hlist_del(9), hlist_del_init(9), hlist_add_head(9), hlist_add_before(9), hlist_add_behind(9), hlist_add_fake(9), hlist_fake(9), hlist_is_singular_node(9), hlist_move_list(9), hlist_splice_init(9), hlist_for_each_entry(9), hlist_for_each_entry_continue(9), hlist_for_each_entry_from(9), hlist_for_each_entry_safe(9), hlist_count_nodes(9)


anyway that's the page πŸ’… this little gem comes from ./include/linux, dated October 2026, and yes it's still called list_bulk_move_tail(9) β€” go move a subsection to the tail, bestie, you got this πŸ«Άβœ¨πŸ’–

πŸ“¦ where this page comes from