folio_matches_swap_entry(9)
π 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 π§
- Kernel file
./mm/swap.h swap_cluster_lock(9)
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
- 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