d_really_is_negative(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 with d_inode to get the inode. like, together, as a duo, main character energy 🀝 3. The dentry may have something attached to ->d_lower and the type field of the flags may be set to something other than miss or whiteout. so like, don't assume, bestie πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

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