kernfs_activate(9)
π¦ 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β thekernfs_nodewhose 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 afterkernfs_remove*()is invoked onkn. 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 π:
kernfs_path_from_node_locked(9)kernfs_name(9)kernfs_path_from_node(9)pr_cont_kernfs_name(9)pr_cont_kernfs_path(9)kernfs_get_parent(9)kernfs_name_hash(9)kernfs_link_sibling(9)kernfs_unlink_sibling(9)kernfs_get_active(9)kernfs_put_active(9)kernfs_drain(9)kernfs_get(9)kernfs_put(9)kernfs_node_from_dentry(9)kernfs_add_one(9)kernfs_find_ns(9)kernfs_find_and_get_ns(9)kernfs_walk_and_get_ns(9)kernfs_create_root(9)kernfs_destroy_root(9)kernfs_root_to_node(9)kernfs_create_dir_ns(9)kernfs_create_empty_dir(9)kernfs_next_descendant_post(9)kernfs_show(9)kernfs_remove(9)kernfs_break_active_protection(9)kernfs_unbreak_active_protection(9)kernfs_remove_self(9)kernfs_remove_by_name_ns(9)kernfs_rename_ns(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms