d_alloc_pseudo(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… d_alloc_pseudo(9) β€” like, the manual page, bestie

Okay so real talk, this is d_alloc_pseudo from the Kernel API Manual, section 9 (iykyk β€” that's the kernel API section, not your average man page energy). Buckle up πŸŽ€


✨ NAME ✨

d_alloc_pseudo β€” allocate a dentry (for lookup-less filesystems) πŸ¦‹

So basically: you want a dentry, but your filesystem is so not into lookups. This is the function for that vibe.


🌸 SYNOPSIS 🌸

struct dentry * d_alloc_pseudo (struct super_block *sb , const struct
       qstr *name );

Note the spacing in the original signature, bestie β€” it's literally struct super_block *sb , const struct qstr *name with that space before the comma. Don't come for me, that's just how it is πŸ’€


🫢 ARGUMENTS 🫢

  • sb β€” the superblock. The big one. The main character of your filesystem's mount 🌈
  • name β€” a qstr of the name. That's the quick-string situation, not a full char *, okay? ✨

πŸ’– DESCRIPTION πŸ’–

Okay so picture this: you have a filesystem that just pins its dentries in memory and never ever performs lookups. Not once. Never. Zero lookup energy. For a filesystem like that, this function returns an unhashed IS_ROOT dentry β€” iconic, rooty, and definitely not living in the hash table πŸ‘‘

What's it for? Pipes, sockets et.al. β€” the stuff that should never be anyone's children or parents. Like, do not put these in your family tree, they are not participating in that whole hierarchy situation. Fr fr. πŸ™ˆ

And here's the spicy detail: unlike all other dentries, these ones will not have an RCU delay between dropping the last reference and freeing them. No grace period era, they just go πŸ’€

The only user is alloc_file_pseudo, and that's what should be considered a public interface. Don't use directly. 🚨 Like, seriously bestie β€” that's the whole warning. Use alloc_file_pseudo, not this.

πŸ‘‘ SEE ALSO πŸ‘‘

Look at this list, it's giving "the entire dentry lore dumped in one place" β€” Kernel file ./fs/dcache.c:


Anyway, that's the whole page, no cap. This little gem lives in <code>./fs</code> and the version/date stamped on it is October 2026 β€” so like, future-era manpage energy, we love to see it. Byeee πŸ§šπŸ’œ

πŸ“¦ where this page comes from