gfs2_unlink(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, so this is a page from the Kernel API Manual β€” the gfs2_unlink(9) one β€” and honestly? it's a short one, but it's lowkey the moment where a file gets yeeted out of existence, so like, respect it πŸ’…


✨ NAME ✨

gfs2_unlink β€” unlink an inode (and yeah, it does rmdir as well, it's a multitasker, we stan πŸ‘‘)


πŸ¦‹ SYNOPSIS πŸ¦‹

int gfs2_unlink (struct inode *dir , struct dentry *dentry );

πŸŽ€ ARGUMENTS πŸŽ€

  • dir β€” the inode of the directory that's holding the inode you wanna unlink. like, the folder it lives in, that one 🏠
  • dentry β€” the file itself. the actual main character of this whole situation 🌟

πŸ’– DESCRIPTION πŸ’–

so the way this works is genuinely kind of iconic β€” the routine peeks at the type of the inode and uses that as its little flag 🚩 to figure out whether this call is an unlink or an rmdir. one function, two destinies, no cap. it checks the vibe (the inode type) and then commits to it πŸ’€βœ¨


🌈 RETURN 🌈

errno 🫢


🧚 SEE ALSO 🧚

kernel file ./fs/gfs2/inode.c, plus literally this whole little friend group:


ngl that's a lot of siblings but they're all doing their thing and we love that for them πŸ’œ

and that's the whole page, bestie πŸŽ€ mwah πŸ’‹ β€” this one came out of ./fs/gfs2, dated October 2026, so you know it's fresh ✨

πŸ“¦ where this page comes from