softleaf_to_folio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ softleaf_to_folio β€” kernel API manual, section 9 bestie ✨

okay so we're doing softleaf_to_folio(9) today and honestly? it's giving "small function, big responsibility" πŸ’… this one lives in the Kernel API Manual and it's here to hand you a struct folio when all you've got is a leaf entry. iconic behavior fr fr.


🌸 NAME 🌸

softleaf_to_folio β€” obtains the struct folio for the PFN that's encoded up inside a leaf entry πŸ“

like. the leaf entry is being sneaky and hiding a PFN in there, and this function goes "no babe, we're getting her out" and hands you the folio. obsessed.


πŸŽ€ SYNOPSIS πŸŽ€

struct folio * softleaf_to_folio (softleaf_t entry );

that's it. one argument. one pointer back. we love a low-effort queen ✨


πŸ’– ARGUMENTS πŸ’–

  • entry β€” the leaf entry itself, and listen: softleaf_has_pfn(entry) must return true. that's not a vibe suggestion, that's a requirement, no cap. if you roll up with an entry that doesn't have a PFN, that's on you 🫢

🌈 RETURN 🌈

a pointer to the struct folio that's associated with the leaf entry's PFN πŸ’« that's the whole deal, that's the tea.


πŸ¦‹ SEE ALSO πŸ¦‹

the kernel file ./include/linux/leafops.h is the home base for all of this, and it's literally a whole friend group of functions. go say hi to all of them:

that's the whole squad, iykyk πŸ’œ


k bye bestie, this page came from ./include/linux and it's dated October 2026, and the manual page is literally called softleaf_to_folio(9) in case you forgot already 😭 mwah, go read your folios πŸ’‹βœ¨

πŸ“¦ where this page comes from