folio_add_pin(9)
π folio_add_pin(9) β the Kernel API Manual, bestie edition π
okay so real talk, this one's from the Kernel API Manual and it's short but it's important, so pay attention for like two seconds π«Ά
β¨ NAME β¨
folio_add_pin β literally just "try to get an additional pin on a pinned folio". that's it. that's the whole vibe π
πΈ SYNOPSIS πΈ
void folio_add_pin (struct folio *folio );
yes girl, void return, so nothing comes back out β it just does the thing β¨
π¦ ARGUMENTS π¦
folioβ the folio that's getting pinned. the main character of this whole operation π
π DESCRIPTION π
so here's the tea: you hit up folio_add_pin when you want an additional pin on a folio that you already have a pin on. no cap β it's the "one more won't hurt" of the folio world π
and the little exception that eats: if the folio is a zero_page, this function makes no change at all. absolutely nothing. it's giving "saw it, didn't care" π
π SEE ALSO π
bestie this list is long, so buckle up. it's all the siblings and adjacent besties over in the Kernel file ./mm/gup.c:
try_grab_folio(9)unpin_user_page(9)unpin_folio(9)unpin_user_pages_dirty_lock(9)unpin_user_page_range_dirty_lock(9)unpin_user_pages(9)unpin_user_folio(9)unpin_folios(9)try_grab_folio_fast(9)follow_page_mask(9)__get_user_pages(9)fixup_user_fault(9)populate_vma_page_range(9)fault_in_writeable(9)fault_in_subpage_writeable(9)fault_in_readable(9)get_dump_page(9)get_user_pages_remote(9)get_user_pages(9)get_user_pages_fast_only(9)get_user_pages_fast(9)pin_user_pages_fast(9)pin_user_pages_remote(9)pin_user_pages(9)memfd_pin_folios(9)folio_add_pins(9)
like, go read all of them, i'll wait π ngl that's the whole friend group right there π₯
π‘ tiny vibe check: this page lives under ./mm, dated October 2026 β so when you're citing it in your notes, that's the source and the date, periodt π
hope that slayed for you, 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