kernfs_activate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ kernfs_activate(9) β€” the Kernel API Manual glow-up ✨

okay so bestie, welcome to the kernfs_activate(9) page πŸ’– this one lives in the Kernel API Manual and honestly? it's a small function with main character energy. let's get into it πŸŽ€


✨ NAME ✨

kernfs_activate β€” activate a node which started deactivated πŸ‘‘


🌸 SYNOPSIS 🌸

void kernfs_activate (struct kernfs_node *kn );

like, that's the whole signature. no cap, that's it 🫢


πŸ’… ARGUMENTS πŸ’…

  • kn β€” the kernfs_node whose subtree is to be activated 🌈 yes, the whole subtree, not just the one node, queen.

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• if the root has KERNFS_ROOT_CREATE_DEACTIVATED set, then a newly created node needs to be explicitly activated. that's the vibe check it has to pass πŸ’€

a node which hasn't been activated isn't visible to userland πŸ‘€ and deactivation is skipped during its removal. so it's just... sitting there, unseen, doing its little ghost thing πŸ™ˆ

and why would you want that? because it's useful to construct atomic init sequences where creation of multiple nodes should either succeed or fail atomically ✨ like all-or-nothing, no messy half-built state lying around. iconic behaviour honestly πŸ‘‘

⚠️ warning bestie: the caller is responsible for ensuring that this function is not called after kernfs_remove*() is invoked on kn. that's on you, not on the kernel. don't do it πŸ™

πŸŽ€ SEE ALSO πŸŽ€

Kernel file ./fs/kernfs/dir.c β€” plus the whole friend group πŸ’œ:


that's the whole page bestie, go activate some nodes responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈ

this lil masterpiece comes from the ./fs/kernfs source, dated October 2026 β€” mwah, sending you a kiss, iykyk πŸ’‹

πŸ“¦ where this page comes from