gfs2_open_common(9)
π 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:
gfs2_llseek(9)gfs2_readdir(9)do_gfs2_set_flags(9)gfs2_size_hint(9)gfs2_allocate_folio_backing(9)gfs2_page_mkwrite(9)gfs2_mmap(9)gfs2_open(9)gfs2_release(9)gfs2_fsync(9)gfs2_file_write_iter(9)calc_max_reserv(9)gfs2_lock(9)gfs2_flock(9)
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
- 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