invalidate_inode_pages2(9)
π invalidate_inode_pages2(9)
okay so bestie, welcome to the Kernel API Manual β this one's a <purple>section 9</purple> situation and it's literally all about yeeting every single page out of an address_space. no cap. π§Ήβ¨
πΈ NAME πΈ
invalidate_inode_pages2 β remove all pages from an address_space
like, all of them. the whole vibe. gone. π«Ά
β SYNOPSIS β
int invalidate_inode_pages2 (struct address_space *mapping );
(yes the spacing in there is exactly what the kernel gods wrote, don't @ me π)
π ARGUMENTS π
mappingβ theaddress_space. that's the thing we're about to clean out, main character of the whole operation π
β¨ DESCRIPTION β¨
so here's the tea π: any pages which are found to be mapped into pagetables are unmapped prior to invalidation.
read that again. unmapped first, invalidated after. it's giving "get out of the pagetable before I get you out of the page cache" π
π₯ RETURN π₯
-EBUSYβ if any pages could not be invalidated. like ok some pages said "no β€οΈ" and the call had to report it. π
π SEE ALSO π
the whole friend group, fr fr β kernel file ./mm/truncate.c and:
folio_invalidate(9)mapping_evict_folio(9)truncate_inode_pages_range(9)truncate_inode_pages(9)truncate_inode_pages_final(9)mapping_try_invalidate(9)invalidate_mapping_pages(9)invalidate_inode_pages2_range(9)truncate_pagecache(9)truncate_setsize(9)pagecache_isize_extended(9)truncate_pagecache_range(9)
okay that's the whole page, you ate that π½οΈπ
live from./mm, dated October 2026 βinvalidate_inode_pages2(9), signing off. mwah πππ¦
π¦ 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