cgroup_is_descendant(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cgroup_is_descendant(9)

okay so this is a page from the Kernel API Manual bestie, and it's about the function cgroup_is_descendant β€” literally the "are we related" vibe check for cgroups 🌸


✨ NAME ✨

cgroup_is_descendant β€” test ancestry πŸ‘‘ (yes, we're doing a whole family tree moment)


✨ SYNOPSIS ✨

bool cgroup_is_descendant (struct cgroup *cgrp , struct cgroup *ancestor );

πŸŽ€ ARGUMENTS πŸŽ€

  • cgrp β€” the cgroup to be tested. this is the one putting itself out there, like "hi am i in this family" πŸ™ˆ
  • ancestor β€” possible ancestor of cgrp. the maybe-parent, the potential ancestor, the one we're checking against πŸ’«

πŸ¦‹ DESCRIPTION πŸ¦‹

so the whole thing: it tests whether cgrp is a descendant of ancestor. that's it, that's the function, and it ate πŸ’…

and listen β€” it also returns true if cgrp == ancestor. so if you're checking yourself against yourself, you're your own ancestor, iconic behavior honestly. self-love fr fr πŸ’–

ngl this function is safe to call as long as cgrp and ancestor are accessible. that's the whole caveat. keep them accessible and you're golden ✨

🌈 SEE ALSO 🌈

bestie there are SO many siblings, this function has main character energy with this many cross-references 😭

Kernel file ./include/linux/cgroup.h:

like every single one of those is linked, go read them, i'm obsessed 🫢


and that's the page!! it lives in ./include/linux (the section for these kernel API pages, iykyk) and it's dated October 2026 ⭐ so yeah, that's the whole thing, you understood it perfectly, slay πŸ§šπŸ’œ

πŸ“¦ where this page comes from