d_backing_inode(9)
β¨ 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:
dget_dlock(9)dget(9)d_unhashed(9)d_really_is_negative(9)d_really_is_positive(9)d_inode(9)d_inode_rcu(9)d_real(9)d_real_inode(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms