d_backing_inode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ d_backing_inode β€” kernel API manual, bestie edition ✨

Okay so real quick, this page lives in the Kernel API Manual (that's the manual name, iykyk πŸ’…) and it's about one tiny helper that lowkey does a lot. Let's get into it 🫢


πŸ’– NAME πŸ’–

d_backing_inode β€” get the upper or lower inode that we should actually be using πŸ‘‘


🌸 SYNOPSIS 🌸

struct inode * d_backing_inode (const struct dentry *upper );

πŸŽ€ ARGUMENTS πŸŽ€

  • upper β€” the upper layer πŸ’« (that's it, that's the whole argument, she's simple like that)

πŸ¦‹ DESCRIPTION πŸ¦‹

So this is the helper you're supposed to reach for when you want to get at the inode that would be used if this dentry were to be opened as a file. No cap, that's literally her whole job ✨

And here's the cute part: the inode may be on the upper dentry, or it may be on a lower dentry that's pinned by the upper one. Either way, d_backing_inode is the one who finds it for you 🧚

But listen β€” normal filesystems should not use this to access their own inodes. Like, that's not what she's for, bestie. Read that one twice πŸ™ˆ

🌈 SEE ALSO 🌈

Kernel file ./include/linux/dcache.h β€” plus the whole friend group:


And that's the page, periodt πŸ’… Big sign-off energy: this one comes from the source tree at ./include/linux, dated October 2026, and it's filed under d_backing_inode(9) in the Kernel API Manual. Obsessed, honestly πŸŽ€πŸ’–πŸ”₯

πŸ“¦ where this page comes from