file_write_started(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🧚:


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