folio_flush_mapping(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_flush_mapping(9) πŸ’…

okay so bestie, this page is from the Kernel API Manual, and it's about folio_flush_mapping(9) β€” a very specific little helper with a very specific job. no cap, it's giving niche but iconic. πŸŽ€


πŸ’– NAME πŸ’–

folio_flush_mapping β€” find the file mapping this folio belongs to. πŸ¦‹

✨ SYNOPSIS ✨

struct address_space * folio_flush_mapping (struct folio *folio );

🌸 ARGUMENTS 🌸

  • folio β€” the folio. that's the whole argument, bestie. she's lowkey simple like that. πŸ’œ

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the vibe: for folios that are in the page cache, folio_flush_mapping() returns the mapping that this page belongs to. slay. ✨

Anonymous folios return NULL, even if they're in the swap cache. and other kinds of folio also return NULL. no exceptions, no drama. 😭

⚠️ this is ONLY used by architecture cache flushing code. like, ONLY only. if you aren't writing cache flushing code, you want either folio_mapping or folio_file_mapping instead β€” periodt. πŸ’…

πŸ‘― SEE ALSO πŸ‘―

Kernel file ./include/linux/pagemap.h is in the group chat, along with all these besties:


signed, sealed, delivered with πŸ’– β€” source/version ./include/linux, date October 2026, page folio_flush_mapping(9). πŸŽ€βœ¨

πŸ“¦ where this page comes from