buffer_migrate_folio_norefs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ buffer_migrate_folio_norefs ✨

okay so bestie, we're in the kernel API manual (section 9, the fancy kernel-doc one) and today's main character is buffer_migrate_folio_norefs β€” literally the migration function for folios with buffers πŸ’…


πŸ’– NAME πŸ’–

buffer_migrate_folio_norefs β€” the migration function for folios that have buffers attached πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int buffer_migrate_folio_norefs (struct address_space *mapping , struct
folio *dst , struct folio *src , enum migrate_mode mode );

🌸 ARGUMENTS 🌸

  • mapping β€” the address space that contains src ✨
  • dst β€” the folio we're migrating to 🫢
  • src β€” the folio we're migrating from πŸ’«
  • mode β€” how we're migrating the folio, iykyk 🌈

πŸ‘‘ DESCRIPTION πŸ‘‘

So it's basically buffer_migrate_folio, except this variant is the careful one β€” it's more cautious and actually checks that there are also no buffer head references. No cap, that's the whole extra vibe check πŸ”₯

This is the right function to reach for on mappings where buffer heads are directly looked up and referenced β€” block device mappings being the iconic example πŸ‘‘


⭐ RETURN ⭐

0 on success, or a negative errno on failure 😭


🧚 SEE ALSO 🧚

Kernel file ./mm/migrate.c:


and that's the whole page, bestie 🫢 this one lives over in ./mm and it's dated October 2026 β€” go forth and migrate those folios safely πŸ’œπŸŽ€

πŸ“¦ where this page comes from