kernfs_node_from_dentry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 πŸ”₯

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