d_ancestor(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… d_ancestor(9) β€” the kernel API manual, bestie edition

okay so real talk, this page lives in the Kernel API Manual and it's about one tiny function that answers a very specific question: is this dentry an ancestor of that dentry, and if so which one do i hand back? that's the whole vibe. let's get into it 🫢


✨ NAME ✨

d_ancestor β€” search for an ancestor, no cap πŸ”


🌸 SYNOPSIS 🌸

struct dentry * d_ancestor (struct dentry *p1 , struct dentry *p2 );

that's it. two pointers in, one pointer out. iconic signature tbh πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • p1 β€” the ancestor dentry πŸ‘‘ (the one that might be the parent-ish one)
  • p2 β€” the child dentry πŸ“ (the one we're checking on)

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” this function returns the ancestor dentry of p2 which is a child of p1, if p1 is an ancestor of p2. otherwise? it gives you NULL. literally that simple. not me explaining this in one sentence 😭

lowkey the whole function is a conditional. no side quests, no hidden options, just vibes and a pointer (or NULL). ✨

🌈 SEE ALSO 🌈

bestie we are NOT done, there is a whole friend group πŸ’– the kernel file is ./fs/dcache.c and here's everybody else you should go say hi to:

like. that's the entire dcache extended universe, go read them all, i'll wait πŸ§šπŸ’œ


okay that's the page!! it's from ./fs, dated October 2026, and yeah the page itself is d_ancestor(9) β€” mwah, slay, periodt πŸ’‹πŸŽ€βœ¨

πŸ“¦ where this page comes from