kernfs_create_link(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so real quick, bestie: this is a page from the Kernel API Manual, section 9 (the kernel API girlies, you know the vibe πŸ‘‘), and it's all about one tiny little function that makes a symlink in kernfs. that's it. that's the whole job. and honestly? she ate. πŸ“


✨ NAME ✨

kernfs_create_link β€” create a symlink πŸŽ€


🌸 SYNOPSIS 🌸

struct kernfs_node * kernfs_create_link (struct kernfs_node *parent ,
   const char *name , struct kernfs_node *target );

no cap, that's the whole signature. look at her. gorgeous. πŸ’–


πŸ¦‹ ARGUMENTS πŸ¦‹

  • parent β€” the directory you're gonna drop this symlink into. like, the vibes-holder. the home base. 🏠
  • name β€” what the symlink is gonna be called. her name. her whole identity, lowkey. 🌟
  • target β€” the node the symlink actually points at. the main character she's linking to, fr fr. πŸ”₯

πŸ’« RETURN πŸ’«

  • if everything slays: you get the created node back. success. iconic. πŸŽ‰
  • if something goes wrong: you get an ERR_PTR value. that's the kernel's way of saying "bestie… no 😭". check it, don't ignore it.
  • also important, and I need you to hear me on this one: ownership of the link matches ownership of the target. like, she copies her target's fit. that's the rule. πŸ‘‘
ngl, if you skipped the ERR_PTR check, that's not a vibe check you're gonna pass πŸ’€

πŸ” SEE ALSO πŸ”

  • Kernel file ./fs/kernfs/symlink.c β€” go read the source, iykfyk, it's giving transparency 🌈

that's the whole page, bestie, you're basically a kernfs girlie now πŸ’…βœ¨

mwah πŸ’‹ β€” this little love letter to symlinks came to you from ./fs/kernfs, dated October 2026, straight out of the Kernel API Manual, section 9. go forth and link responsibly πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from