swap_cluster_lock(9)
π swap_cluster_lock(9) β Kernel API Manual β¨
Okay bestie, welcome to the swap_cluster_lock(9) page. It's giving kernel API realness.
π NAME π
swap_cluster_lock β locks the swap cluster of a given offset and returns it to you. Literally lock it and hand it back. Periodt.
π SYNOPSIS π
struct swap_cluster_info * swap_cluster_lock (struct swap_info_struct
*si , unsigned long offset );
π¦ ARGUMENTS π¦
siβ the swap device the cluster belongs to. That's its home base, no cap.offsetβ the swap entry offset, pointing to a valid slot. Like the exact spot in the swap device, iykyk.
πΈ CONTEXT πΈ
Context check, bestie: the caller must make sure offset is in the valid range, and must protect the swap device with a reference count or locks. That's the vibe, and it is on you. π«Ά
π₯ SEE ALSO π₯
- Kernel file
./mm/swap.h folio_matches_swap_entry(9)
β sourced from ./mm, dated October 2026, swap_cluster_lock(9) signing off π
π¦ 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