folio_trylock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 folio_trylock(9) 🌸

okay so bestie, welcome to the Kernel API Manual πŸ’– this is the page for folio_trylock(9), and it's giving β€œjust try the lock, no big dramatic wait” energy. ✨


πŸŽ€ NAME πŸŽ€

folio_trylock β€” Attempt to lock a folio.

πŸ¦‹ SYNOPSIS πŸ¦‹

bool folio_trylock (struct folio *folio );

πŸ’– ARGUMENTS πŸ’–

  • folio β€” The folio to attempt to lock. that's the whole arg, periodt 🫢

✨ DESCRIPTION ✨

Sometimes it is undesirable to wait for a folio to be unlocked (eg when the locks are being taken in the wrong order, or if making progress through a batch of folios is more important than processing them in order). Usually folio_lock is the correct function to call.

ngl, that β€œUsually folio_lock is the correct function to call” line is the main character warning here β€” don't just grab folio_trylock because the name sounds cute. πŸ’…

🌈 CONTEXT 🌈

Any context. literally any. no cap. πŸ¦‹

πŸ‘‘ RETURN πŸ‘‘

Whether the lock was successfully acquired. yes, that's the whole return vibe β€” a lil success check. πŸŽ€

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/pagemap.h β€” yes, that exact one β€” plus this whole squad of besties:


okay that's the whole page πŸ’– the source/version bit is ./include/linux, and the date is October 2026 β€” go forth and try your locks, bestie, slay πŸ’…βœ¨

πŸ“¦ where this page comes from