unpin_folio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– unpin_folio β€” kernel API manual, bestie edition πŸ’–

okay so this is unpin_folio(9) from the Kernel API Manual, and it is genuinely one of the shortest little pages ever, so let's get into it 🫢


✨ NAME ✨

unpin_folio β€” release a dma-pinned folio. that's it. that's the whole job. unpin_folio releases a folio that got dma-pinned. iconic, minimal, does exactly what it says πŸ’…


🌸 SYNOPSIS 🌸

void unpin_folio (struct folio *folio );

no return value, no drama, just void and vibes ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • folio β€” pointer to the folio that's getting released. yep, that's the whole argument list. one (1) folio, handed over so it can be set free πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

so here's the lore: folios that were pinned via memfd_pin_folios or other similar routines must be released β€” and you've got two ways to do it, either with unpin_folio or with unpin_folios. that's the rule, no cap. pinned means somebody's gotta unpin it eventually, and this is one of your two doors out πŸšͺ✨

lowkey important: the original says must be released, so like… don't just leave your pinned folios hanging, bestie 😭

🌈 SEE ALSO 🌈

it's giving "let me introduce you to the whole friend group" β€” the Kernel file ./mm/gup.c crew, all of them, in order:

like, the entire ./mm friend group showed up to the group chat πŸ”₯ go read them all, iykyk πŸ‘‘


and that's the page, babe β€” brought to you from ./mm, dated October 2026, and filed under unpin_folio(9) in the Kernel API Manual. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from