d_hash_and_lookup(9)
π d_hash_and_lookup(9) β Kernel API Manual π
okay bestie, welcome to the Kernel API Manual page for d_hash_and_lookup(9). This little function hashes the qstr and then searches for a dentry. Itβs giving βsmall but essential,β and weβre gonna keep every detail, no cap. π«Ά
πΈ NAME πΈ
d_hash_and_lookup β hash the qstr then search for a dentry π«
β¨ SYNOPSIS β¨
struct dentry * d_hash_and_lookup (struct dentry *dir , struct qstr
*name );
π ARGUMENTS π
dirβ the directory to search in. Your starting point, bestie. πnameβ theqstrof the name we wish to find. Thatβs the name-vibe weβre hunting for. π
π DESCRIPTION π
So hereβs the tea: on lookup failure, NULL is returned. On a bad name, you get - ERR_PTR(-error). Thatβs literally it for the description, and yes, the error path is iconic in a βplease handle me carefullyβ way. π
π¦ SEE ALSO π¦
Kernel file ./fs/dcache.c has the whole friend group, and these are all the references β every single one, periodt:
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_lookup(9)d_delete(9)d_rehash(9)d_add(9)d_ancestor(9)d_splice_alias(9)is_subdir(9)
thatβs the whole page, bestie: source/version ./fs, dated October 2026, page d_hash_and_lookup(9) β slay and bye! πβ¨
π¦ 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