gfs2_unlink_inode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay so this is gfs2_unlink_inode(9), a page from the Kernel API Manual, and it's literally about removing an inode from its parent dir and unlinking it. Yes girl, we're doing filesystem surgery today πŸ©ΊπŸ’–


✨ NAME ✨

gfs2_unlink_inode β€” removes an inode from its parent dir and unlinks it πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int gfs2_unlink_inode (struct gfs2_inode *dip , const struct dentry
       *dentry );

Like, that's the whole signature. Short king. πŸ‘‘


🌸 ARGUMENTS 🌸

  • dip β€” the parent directory πŸ’œ that's literally it, that's the vibe.
  • dentry β€” the dentry to unlink 🫢 the thing we're sending off into the void.

🧚 DESCRIPTION 🧚

So the way this gets called: it comes in with all the locks and in a transaction πŸ”’βœ¨ β€” no cap, that's the requirement, and you do not skip it.

And here's the tea β˜• β€” this will only be called for a directory after it has been checked to ensure it is empty. Not me stressing that again but like, it's important: empty check first, then this. Periodt. πŸ’…


🌈 RETURN 🌈

0 on success, or an error 😭 β€” either the slay outcome or the oops outcome, no in-between.


πŸ”₯ SEE ALSO πŸ”₯

Gathering all the besties, iykyk πŸ’– Kernel file ./fs/gfs2/inode.c and the whole friend group:


Okay bye bestie, mwah πŸ’‹ πŸŽ€ β€” this one came from ./fs/gfs2, dated October 2026, and it's the gfs2_unlink_inode(9) page. Go unlink something (safely, with locks, in a transaction πŸ™ˆπŸ’€).

πŸ“¦ where this page comes from