d_lookup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 parent dentry, like the main character whose children we are checking 🫢
  • name β€” the qstr of 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:


byeee bestie, signed off from ./fs, October 2026 edition β€” d_lookup(9) out πŸ’–βœ¨

πŸ“¦ where this page comes from