path_from_stashed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ path_from_stashed(9) ✨

okay so bestie, welcome to the Kernel API Manual entry for path_from_stashed(9) β€” yes that's the real title, no cap, we're doing a whole manpage together and it's gonna be iconic πŸ’…


🌸 NAME 🌸

path_from_stashed β€” create path from stashed or new dentry


πŸ¦‹ SYNOPSIS πŸ¦‹

int path_from_stashed (struct dentry **stashed , struct vfsmount *mnt ,
void *data , struct path *path );

πŸ’– ARGUMENTS πŸ’–

  • stashed β€” where to retrieve or stash dentry (it's giving both directions, she does it all 🫢)
  • mnt β€” mnt of the filesystems to use
  • data β€” data to store in inode->i_private
  • path β€” path to create

πŸŽ€ DESCRIPTION πŸŽ€

So here's the tea β˜• β€” the function tries to retrieve a stashed dentry from stashed. If the dentry is still valid then it will be reused. Slay, no wasted work πŸ’…

But if the dentry isn't able? (yes, that's the original phrasing bestie, she said what she said) then the function will allocate a new dentry and inode. Then β€” and this is the cute part β€” it will check again whether it can reuse an existing dentry in case one has been added in the meantime, or update stashed with the newly added dentry. Look at her double-checking, main character energy honestly πŸ‘‘

Special-purpose helper for nsfs and pidfs. That's it, that's her whole job, and she ate πŸ”₯


⭐ RETURN ⭐

On success zero πŸŽ‰ and on failure a negative error is returned 😭

ngl bestie, always check the return value β€” a negative number means something went sideways and you don't wanna find out later πŸ’€

🌈 SEE ALSO 🌈

Kernel file ./fs/libfs.c β€” and here's the whole squad, all of them, nobody left behind 🫢:


and that's the page!! 🧚 source/version is ./fs, dated October 2026, and the page itself is path_from_stashed(9) β€” mwah, go read the kernel, ily, bye bestie πŸ’œπŸ“

πŸ“¦ where this page comes from