gfs2_open_common(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– gfs2_open_common(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” this one's from the gfs2 girlies, and it's literally the shared helper that both open and atomic_open use. no cap, it's giving "two paths, one function" energy ✨


✨ NAME ✨

gfs2_open_common β€” the common bit shared by open and atomic_open 🫢

πŸŽ€ SYNOPSIS πŸŽ€

int gfs2_open_common (struct inode *inode , struct file *file );

🌸 ARGUMENTS 🌸

  • inode β€” the inode that's being opened, main character of the whole operation πŸ’…
  • file β€” the file that's being opened, its plus-one πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this is the important part, listen up πŸ‘‘

This maybe gets called under a glock or not, depending on how it's been called. iykyk.

But β€” and this is the real tea β€” for regular files we must always be called under a glock. always. no exceptions, fr fr. 🚨

For other file types, it genuinely does not matter whether we hold the glock or not. do with that what you will πŸ’€

⭐ RETURN ⭐

an error code, or 0 for success. slay 🌈

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./fs/gfs2/file.c β€” plus the whole friend group:


source era: ./fs/gfs2, dated October 2026 β€” that's the whole man page, bestie, go forth and open some files πŸ§šβ€β™€οΈπŸ’–

πŸ“¦ where this page comes from