file_write_started(9)
π file_write_started(9) β a whole Kernel API Manual moment
okay bestie, buckle up, because we're diving into the Kernel API Manual and today's main character is file_write_started(9). yes it's a real function. yes it's lowercase. yes she's iconic. πΈ
β¨ NAME β¨
file_write_started β literally just checks if SB_FREEZE_WRITE is held π
π¦ SYNOPSIS π¦
bool file_write_started (const struct file *file );
πΈ ARGUMENTS πΈ
fileβ the file we write to. that's it. that's the whole argument. she's low maintenance π
π DESCRIPTION π
so here's the tea, bestie π
This can be a false positive with !CONFIG_LOCKDEP/LOCK_STATE_UNKNOWN. like, it might say "yeah write's started" when the vibe check is genuinely unknown. no cap.
It can also be a false positive with !S_ISREG, because file_start_write has no effect on !S_ISREG. so if it's not a regular file, the whole thing is basically doing nothing and our little check is out here guessing. π
fr fr, both of these are straight-up "may be false positive" situations β don't come for me, it's in the manual. π«Ά
π₯ SEE ALSO π₯
Kernel file ./include/linux/fs.h β and like, the entire extended fam π§:
enum positive_aop_returns(9)struct address_space(9)struct file_ra_state(9)struct file(9)i_uid_into_vfsuid(9)i_uid_needs_update(9)i_uid_update(9)i_gid_into_vfsgid(9)i_gid_needs_update(9)i_gid_update(9)inode_fsuid_set(9)inode_fsgid_set(9)fsuidgid_has_mapping(9)inode_set_ctime(9)file_write_not_started(9)struct renamedata(9)is_mgtime(9)iput_if_not_last(9)is_idmapped_mnt(9)file_start_write(9)file_end_write(9)kiocb_start_write(9)kiocb_end_write(9)name_is_dot_dotdot(9)name_contains_dotdot(9)inode_dio_begin(9)inode_dio_end(9)generic_ci_validate_strict_name(9)
and that's the whole page, bestie β¨ this one came straight out of ./include/linux and it's dated October 2026 β so yeah, she's from the future, and she ate. π π π
π¦ 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