__folio_lock(9)
π __folio_lock(9) π
okay so bestie, welcome to the Kernel API Manual β yes, THE kernel API manual, the one and only, and today's main character is __folio_lock. pull up a chair π
β¨ NAME β¨
__folio_lock β get a lock on the folio, assuming we need to sleep to get it. no cap, that's the whole vibe. it locks the folio, and the "assuming we need to sleep" part is doing a LOT of heavy lifting there, so likeβ¦ respect it π«Ά
πΈ SYNOPSIS πΈ
void __folio_lock (struct folio *folio );
that's it. that's the whole call. one (1) argument, zero (0) return value, void as the day it was born π
π¦ ARGUMENTS π¦
folioβ the folio you want to lock. the folio. your folio. go get 'em. β¨
π₯ SEE ALSO π₯
omg okay this list is LONG, like genuinely iconic levels of long, but every single one of these is a real reference and we do NOT skip entries in this house π
first up, the source file itself lives in the kernel at ./mm/filemap.c, and here's everybody it's hanging out with:
filemap_remove_folio(9)filemap_fdatawrite_range(9)filemap_flush_range(9)filemap_flush(9)filemap_range_has_page(9)filemap_fdatawait_range(9)filemap_fdatawait_range_keep_errors(9)file_fdatawait_range(9)filemap_fdatawait_keep_errors(9)filemap_write_and_wait_range(9)file_check_and_advance_wb_err(9)file_write_and_wait_range(9)replace_page_cache_folio(9)softleaf_entry_wait_on_locked(9)folio_put_wait_locked(9)folio_unlock(9)folio_end_read(9)folio_end_private_2(9)folio_wait_private_2(9)folio_wait_private_2_killable(9)folio_end_writeback_no_dropbehind(9)folio_end_writeback(9)page_cache_next_miss(9)page_cache_prev_miss(9)__filemap_get_folio_mpol(9)find_get_entries(9)find_lock_entries(9)filemap_get_folios(9)filemap_get_folios_contig(9)filemap_get_folios_tag(9)filemap_get_folios_dirty(9)filemap_read(9)generic_file_read_iter(9)filemap_splice_read(9)mapping_seek_hole_data(9)filemap_fault(9)read_cache_folio(9)mapping_read_folio_gfp(9)read_cache_page_gfp(9)__generic_file_write_iter(9)generic_file_write_iter(9)filemap_release_folio(9)filemap_invalidate_inode(9)filemap_cachestat(9)
likeβ¦ a whole friend group ππ«Ά every one of them got an invite and every one of them showed up.
and that's the page, bestie π this little gem comes from ./mm, dated October 2026 β screenshot it, frame it, put it on your fridge, it's giving reference-material royalty πβ¨π
π¦ 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