d_really_is_negative(9)
π d_really_is_negative β the kernel API manual, bestie edition
okay so this is a page from the Kernel API Manual and it's about d_really_is_negative(9) β yes that's the actual name, no we're not renaming it, it's iconic as is π
β¨ NAME β¨
d_really_is_negative β figure out if a dentry is really negative, and by "really" we mean ignoring fallthroughs entirely π
πΈ SYNOPSIS πΈ
bool d_really_is_negative (const struct dentry *dentry );
π¦ ARGUMENTS π¦
dentryβ the dentry you're side-eyeing π like, the one in question, the one we're investigating
π DESCRIPTION π
Returns true if the dentry represents either an absent name or a name that doesn't map to an inode (ie. ->d_inode is NULL). no cap, that's the whole vibe check β¨
The dentry could represent a true miss, a whiteout that isn't represented by a 0,0 chardev, or a fallthrough marker in an opaque directory. literally all three possibilities, and we're not picking favourites π«Ά
Note! okay listen, three things, and they matter π 1. This should be used *only* by a filesystem to examine its own dentries. It should not be used to look at some other filesystem's dentries. respectfully, stay in your lane π 2. It should also be used in combination withd_inodeto get the inode. like, together, as a duo, main character energy π€ 3. The dentry may have something attached to->d_lowerand the type field of the flags may be set to something other than miss or whiteout. so like, don't assume, bestie π
π₯ SEE ALSO π₯
- Kernel file
./include/linux/dcache.h dget_dlock(9)dget(9)d_unhashed(9)d_really_is_positive(9)β the flip side, the other half of the story βd_inode(9)d_inode_rcu(9)d_backing_inode(9)d_real(9)d_real_inode(9)
the whole friend group, go say hi π
sign-off time π this little gem lives in ./include/linux, dated October 2026, and it's filed under d_really_is_negative(9) β the (9) means kernel API manual, iykyk. slay, go read your dentries responsibly π
π¦ 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