ovl_lookup_real_one(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ovl_lookup_real_one(9) β€” from the Kernel API Manual, bestie 🫢

Okay so picture this: you're deep in overlayfs land, you've got a real dentry in your hand, and you're like "girl, WHO is your overlay counterpart?" That's literally this function's entire job. It lives in the Kernel API manual section 9, and it's giving "matchmaker for dentries" energy ✨


✨ NAME ✨

ovl_lookup_real_one β€” lookup a child overlay dentry to get an overlay dentry whose real dentry is given πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

struct dentry * ovl_lookup_real_one (struct dentry *connected , struct
dentry *real , const struct ovl_layer *layer );

πŸŽ€ ARGUMENTS πŸŽ€

  • connected β€” the parent overlay dentry πŸ‘‘ (the one we're searching inside of)
  • real β€” the given child real dentry πŸ“ (the one we're trying to find a match for)
  • layer β€” the layer in which real exists 🌈

πŸ’œ DESCRIPTION πŸ’œ

So here's the whole vibe ngl: it looks up a child overlay dentry in connected with the same name as the real dentry. Simple enough, right?

But no β€” it does NOT stop there, because this function is thorough and honestly a little paranoid (affectionate πŸ’€). Then it does two vibe checks:

  1. it checks that the parent of the result is the real dentry for connected, and
  2. it checks that real is the real dentry for the result πŸ™ˆ

Like, double-verifying the match. No cap, it's committing to the bit.


πŸ”₯ RETURN πŸ”₯

  • -ECHILD β€” if the parent of real is no longer the real dentry for connected 😭 (the relationship changed out from under you)
  • -ESTALE β€” if real is not the real dentry of the found dentry πŸ’€ (you found someone, but they're not the one)
  • otherwise β€” the found dentry is returned, slay πŸ‘‘βœ¨

🌸 SEE ALSO 🌸

Kernel file ./fs/overlayfs/export.c β€” go read it, iykyk 🧚


k that's the whole page bestie, mwah πŸ’… β€” brought to you by ./fs/overlayfs, dated October 2026, and fr fr you're gonna nail this one 🌟

πŸ“¦ where this page comes from