nommu_shrink_inode_mappings(9)
π nommu_shrink_inode_mappings(9)
okay so bestie, welcome to the Kernel API Manual β¨ this one's a whole function, and she's got a big job: shrinking shared mappings on an inode without breaking anyone's vibe. let's get into it π«Ά
πΈ NAME πΈ
nommu_shrink_inode_mappings β literally shrinks the shared mappings on an inode π«
β¨ SYNOPSIS β¨
int nommu_shrink_inode_mappings (struct inode *inode , size_t size ,
size_t newsize );
the way she takes three arguments and returns an intβ¦ main character energy fr fr π
π ARGUMENTS π
inodeβ the inode to check π that's the one we're doing a vibe check onsizeβ the current filesize of the inode, like right now, as it standsnewsizeβ the proposed filesize of the inode, aka where we're tryna take her
π¦ DESCRIPTION π¦
so here's the tea β this function checks the shared mappings on an inode on behalf of a shrinking truncate β and the whole point is making sure that any outstanding VMAs aren't broken π like, not on our watch.
then it shrinks the vm_regions that extend beyond, so that do_mmap doesn't automatically grant mappings that are too large. no cap, that's the entire assignment π
π SEE ALSO π
- Kernel file
./mm/nommu.cπ vmalloc_node(9)vzalloc_node(9)vmalloc_32(9)vmalloc_32_user(9)access_remote_vm(9)copy_remote_vm_str(9)
go read those next, iykyk π§
okay that's the whole page bestie, you ate that π mwah π
sign-off szn: this lil masterpiece lives over in ./mm, dated October 2026, and it's filed under nommu_shrink_inode_mappings(9) β periodt π
π¦ 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