d_lookup(9)
π NAME π
okay bestie, this is the d_lookup(9) page from the Kernel API Manual β¨ and it is literally here to help you search for a dentry. So:
d_lookup β search for a dentry. No cap π
β¨ SYNOPSIS β¨
struct dentry * d_lookup (const struct dentry *parent , const struct
qstr *name );
π ARGUMENTS π
parentβ the parentdentry, like the main character whose children we are checking π«Άnameβ theqstrof the name we wish to find π
πΈ RETURN πΈ
A dentry, or NULL π¦. That is the whole return vibe.
π¦ DESCRIPTION π¦
okay so d_lookup searches the children of the parent dentry for the name in question. It is giving βwhere is that entry bestieβ πβ¨.
If the dentry is found, its reference count is incremented and the dentry is returned. The caller must use dput to free the entry when it has finished using it. Like, not optional β dput is the cleanup bestie π
.
NULL is returned if the dentry does not exist. So if you get NULL, it is not a vibe, it is just not there π.
π SEE ALSO π
Kernel file ./fs/dcache.c, and here is the full squad, no skips:
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_alloc_pseudo(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_hash_and_lookup(9)d_delete(9)d_rehash(9)d_add(9)d_ancestor(9)d_splice_alias(9)is_subdir(9)
byeee bestie, signed off from ./fs, October 2026 edition β d_lookup(9) out πβ¨
π¦ 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