gfs2_unlink(9)
πΈ gfs2_unlink(9) πΈ
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:
gfs2_set_iop(9)gfs2_inode_lookup(9)gfs2_lookup_by_inum(9)gfs2_lookup_meta(9)gfs2_lookupi(9)create_ok(9)gfs2_init_xattr(9)init_dinode(9)gfs2_trans_da_blks(9)gfs2_create_inode(9)gfs2_create(9)__gfs2_lookup(9)gfs2_link(9)gfs2_unlink_inode(9)gfs2_symlink(9)gfs2_mkdir(9)gfs2_mknod(9)gfs2_atomic_open(9)update_moved_ino(9)gfs2_rename(9)gfs2_exchange(9)gfs2_get_link(9)gfs2_permission(9)gfs2_setattr(9)gfs2_getattr(9)
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
- 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