lock_page(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… lock_page(9) β€” Kernel API Manual, bestie edition πŸ’–

✨ NAME ✨

lock_page β€” lock the folio containing this page. That’s the whole vibe. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

void lock_page (struct page *page );

πŸŽ€ ARGUMENTS πŸŽ€

  • page β€” the page to lock. That’s it, that’s the assignment. πŸ’…

πŸ’– DESCRIPTION πŸ’–

Okay so for the actual deets on what this lock protects, go read folio_lock β€” it has the lore. πŸ“–

This one is a legacy function, bestie. It’s giving old-school πŸ’€, and new code should probably use folio_lock instead. No cap. ✨

πŸ¦‹ CONTEXT πŸ¦‹

It may sleep 😴 β€” so plan accordingly.

Pages in the same folio share a lock, so do not attempt to lock two pages which share a folio. That’s a no-no, fr fr. πŸ™…β€β™€οΈ

🌈 SEE ALSO 🌈

Kernel file ./include/linux/pagemap.h β€” and the whole squad is here:


🫢 cute sign-off: source/version is ./include/linux, the date is October 2026, and the manual name is lock_page(9). bye bestie, mwah πŸ’‹βœ¨
πŸ“¦ where this page comes from