d_hash_and_lookup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the qstr of 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:


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