folio_redirty_for_writepage(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_redirty_for_writepage(9) β€” the kernel API manual, bestie edition

okay so you found folio_redirty_for_writepage in the Kernel API Manual and you're like "what is this, why is it here, do I need it" β€” don't worry, I got you 🫢 this is literally the "jk, never mind, keep it dirty" function and honestly it's giving main character energy for anyone writing a writepage implementation ✨


🌸 NAME 🌸

folio_redirty_for_writepage β€” Decline to write a dirty folio.

like, you're saying "no thanks bestie, I'm not writing this one" πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

bool folio_redirty_for_writepage (struct writeback_control *wbc , struct
folio *folio );

so it hands you back a bool, and you feed it a wbc and a folio. that's the whole vibe check 😌


✨ ARGUMENTS ✨

  • wbc β€” The writeback control. yes, the actual writeback control struct, she's the boss of this whole operation πŸ‘‘
  • folio β€” The folio. the folio in question. the one we're talking about. the star of the show 🌟

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea β˜• when a writepage implementation decides that it doesn't want to write folio for some reason β€” and honestly valid, we've all been there β€” it should call this function, unlock folio, and return 0.

that's it. that's the whole thing. call it, unlock the folio, return 0, move on with your life. no cap 🧚


πŸ”₯ RETURN πŸ”₯

  • True if we redirtied the folio. slay, mission accomplished πŸ’…
  • False if someone else dirtied it first. awkward but okay, they beat you to it 😭
ngl, that True/False distinction is lowkey important β€” it's literally telling you whether you were the one who re-dirtied it or whether another thread got there first. iykyk πŸ‘€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./mm/page-writeback.c and honestly the whole friend group:

like a whole squad of dirty-page besties, go say hi 🌈


and that's the page bestie!! πŸŽ€ this one lives in ./mm, dated October 2026, and it's filed under folio_redirty_for_writepage(9) β€” periodt. go forth and decline to write that folio πŸ’œβœ¨

πŸ“¦ where this page comes from