cgroup_kn_unlock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cgroup_kn_unlock(9) β€” a Kernel API Manual moment

okay bestie, welcome to the Kernel API Manual page for cgroup_kn_unlock β€” yes this is the real deal, it's a section 9 kernel thing, and it's lowkey one of the shortest pages you'll ever read, so hydrate and let's go 🫢


✨ NAME ✨

cgroup_kn_unlock β€” the unlocking helper for cgroup kernfs methods. that's it, that's the whole job description πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

void cgroup_kn_unlock (struct kernfs_node *kn );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • kn β€” the kernfs_node being serviced. like, the node in question, the main character of this function call πŸ‘‘

🌸 DESCRIPTION 🌸

so this helper does the exact opposite of cgroup_kn_lock_live β€” it undoes what that one did. the way to use it is: if your locking succeeded, call this before the method finishes. that's the whole vibe check ✨

⚠️ real talk, and this part matters: once this function returns, the cgroup you got back from cgroup_kn_lock_live may become inaccessible at any time. any time. no warning, no text, just gone 😭 so if you plan on continuing to touch that cgroup afterward, you gotta pin it before you invoke this function. pin first, unlock after. that's the order. periodt πŸ’…

πŸ’œ SEE ALSO πŸ’œ

the kernel file lives at ./kernel/cgroup/cgroup.c and here's the full friend group, all in (9)-land, all accounted for, no cap:


🌈 sign-off 🌈

and that's the page!! this little guy comes from the source tree at ./kernel/cgroup, dated October 2026, and it's filed under cgroup_kn_unlock(9) in the Kernel API Manual πŸ’– go forth, pin your cgroups, unlock responsibly, iykyk πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from