gfs2_permission(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:

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