gfs2_permission(9)
β¨ gfs2_permission β¨
okay bestie, welcome to the gfs2_permission page π
this one lives in the Kernel API Manual, and ngl the NAME line is a little mysterious β it's literally just gfs2_permission with no description after the dash. iconic minimalist behavior, we respect it π
πΈ SYNOPSIS πΈ
int gfs2_permission (struct mnt_idmap *idmap , struct inode *inode , int
mask );
like, that's the whole vibe. one function, three args, int on the way out β¨
π¦ ARGUMENTS π¦
idmapβ the idmap of the mount that the inode was found from π«Ά (iykyk, it's the mapping context for the mount you scooped this inode out of)inodeβ the inode itself. the main character, literally πmaskβ the mask to be tested π§ͺ that's what we're checking permissions against
π DESCRIPTION π
so here's the situation, bestie: this can be called from the VFS directly, or from inside GFS2 while the inode is already locked π and because of that double-entry energy, we do a lil vibe check first β we look to see if the glock is already locked, and we only lock the glock if it hasn't already been done π no double-locking, no drama, we're not about that life π
lowkey the whole function is that check. it's giving "responsible friend who texts 'you up?' before just showing up" π
β RETURN β
errno β that's it, that's the return value π
π§ SEE ALSO π§
okay so this is a long list and we're not skipping a single one, because every one of these is part of the family π«Ά they all live in the kernel file ./fs/gfs2/inode.c:
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_unlink(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_setattr(9)gfs2_getattr(9)
like, go read them, they're all slaying in their own way π₯
okay and one tiny heads up before you go: this whole page comes from ./fs/gfs2 and it's dated October 2026 under the Kernel API Manual π that's the version and source, just so you have receipts. mwah, go check those glocks bestie ππΈ
π¦ 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