folio_matches_swap_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_matches_swap_entry(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ this one's a lil function from the kernel that literally just does a vibe check on a folio against a swap entry 🫢 it's short, it's sweet, it's giving "small but mighty", let's go πŸŽ€


🌸 NAME 🌸

folio_matches_swap_entry β€” Check if a folio matches a given swap entry. that's it. that's the whole job πŸ’…


✨ SYNOPSIS ✨

bool folio_matches_swap_entry (const struct folio *folio , swp_entry_t
entry );

like, you hand it a folio and a swap entry, and it tells you if they're a match πŸ‘‘ genuinely the simplest situationship in the kernel.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • folio β€” The folio. yes queen, that's the one you're asking about πŸ’–
  • entry β€” The swap entry to check against. this is the one it's being compared to, iykyk 🌈

πŸ”’ CONTEXT πŸ”’

no cap, this part matters: the caller should have the folio locked to ensure it's stable and nothing will move it in or out of the swap cache 😭

fr fr please hold the lock, bestie β€” without it the folio could be out here main character-ing around the swap cache and your answer would be a whole lie πŸ’€

⭐ RETURN ⭐

true or false. that's the tea πŸ“ match or no match, no in-between, periodt.


🧚 SEE ALSO 🧚


okay that's the whole page, you ate that πŸ’… this iconic lil doc lives in ./mm, dated October 2026, and it's brought to you by the Kernel API Manual β€” go forth and check those folios, bestie πŸ«Άβœ¨πŸŽ€

πŸ“¦ where this page comes from