list_del_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… list_del_range(9) β€” Kernel API Manual, bestie edition πŸŽ€

okay so picture this: you're deep in list_del_range(9) from the Kernel API Manual and you just need someone to explain it like a friend, not a brick wall. that's me, i'm that friend ✨


✨ NAME ✨

list_del_range β€” deletes a whole range of entries from a list. like, a bunch of them at once, not just one. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

void list_del_range (struct list_head *begin , struct list_head *end );

🌸 ARGUMENTS 🌸

  • begin β€” the first element in the range you're deleting from the list. the opening act 🎬
  • end β€” the last element in the range you're deleting from the list. the finale, periodt πŸ‘‘

πŸŽ€ NOTE πŸŽ€

ok genuinely important, bestie, do not skip this one: list_empty on the range of entries does not return true after this. the entries are in an undefined state. undefined!! like, do not touch, do not poke, do not look at them expecting answers 😭 that's the whole vibe of this note and it's not a cute one.

🧚 SEE ALSO 🧚

so like. the extended universe. the whole friend group πŸ’œ


ok that's the whole thing, no gatekeeping, you now know more about linked-list range deletion than most people at the function 🫢

sign-off time ✨ this page lives in ./tools/include/linux, dated October 2026, and it's still out here serving list_del_range(9) realness. mwah. πŸ’…πŸ’–
πŸ“¦ where this page comes from