d_alloc_pseudo(9)
π 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β aqstrof the name. That's the quick-string situation, not a fullchar *, 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 isalloc_file_pseudo, and that's what should be considered a public interface. Don't use directly. π¨ Like, seriously bestie β that's the whole warning. Usealloc_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:
d_drop(9)dentry_kill(9)__move_to_shrink_list(9)d_find_any_alias(9)d_find_alias(9)prune_dcache_sb(9)shrink_dcache_sb(9)enum d_walk_ret(9)d_walk(9)path_has_submounts(9)shrink_dcache_tree(9)d_invalidate(9)__d_alloc(9)d_alloc(9)d_instantiate(9)d_obtain_alias(9)d_obtain_root(9)d_add_ci(9)d_same_name(9)__d_lookup_rcu(9)d_lookup(9)__d_lookup(9)d_hash_and_lookup(9)d_delete(9)d_rehash(9)d_add(9)d_ancestor(9)d_splice_alias(9)is_subdir(9)
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
- 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