kernfs_node_from_dentry(9)
π
kernfs_node_from_dentry β Kernel API Manual β¨
okay so bestie, this is kernfs_node_from_dentry(9) from the Kernel API Manual, and it's literally the "who's your node?" function of the kernfs world π
πΈ NAME πΈ
kernfs_node_from_dentry β determine kernfs_node associated with a dentry (yes it does exactly what it says on the tin, iconic behavior honestly π)
β¨ SYNOPSIS β¨
struct kernfs_node * kernfs_node_from_dentry (struct dentry *dentry );
like, you hand it a dentry and it hands you back a node pointer. simple. elegant. slay π
π¦ ARGUMENTS π¦
dentryβ the dentry in question π§ (that's it, that's the whole argument, no notes)
π RETURN π
it gives you the kernfs_node associated with dentry. and if dentry is not a kernfs one? you get NULL back β no cap, that's the whole deal π
π DESCRIPTION π
okay so here's the tea β β while the returned kernfs_node will stay accessible as long as dentry is accessible, the returned node can be in any state. any. like, do not assume. and the caller is fully responsible for determining what's actually accessible. that's on you bestie, not on the function π«Ά
fr fr read that again β accessible β valid-state. the node keeps existing, but its vibe check is your problem π
π₯ SEE ALSO π₯
- Kernel file
./fs/kernfs/dir.ckernfs_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_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_activate(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 friend group, go say hi to all of them π
and that's the page!! π this little beauty lives in ./fs/kernfs, dated October 2026, and it's filed under kernfs_node_from_dentry(9) β mwah, go read some kernel source, you got this π§π
π¦ 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