ufs_get_locked_folio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ufs_get_locked_folio(9) πŸ’…

ok so bestie, welcome to the Kernel API Manual β€” this one's a lil UFS function called ufs_get_locked_folio, and honestly it's giving "find it, grab it, lock it down" energy πŸ‘‘


✨ NAME ✨

ufs_get_locked_folio β€” locate, pin and lock a pagecache folio, and if it doesn't exist yet, read it from disk. that's the whole gig fr fr 🫢


🌸 SYNOPSIS 🌸

struct folio * ufs_get_locked_folio (struct address_space *mapping ,
       pgoff_t index );

πŸŽ€ ARGUMENTS πŸŽ€

  • mapping β€” the address_space to search. it's the place you're gonna go looking, iykyk πŸ”
  • index β€” the page index. literally just which page you want, bestie πŸ“–

πŸ’– DESCRIPTION πŸ’–

okay so here's the vibe: ufs_get_locked_folio locates the desired pagecache folio for you, and if it doesn't exist, we'll read it from disk (no cap, it'll go get it πŸ’€). then it locks it, increments its reference count, and returns its address. pin + lock + return, all in one slay ✨

it's giving main character energy: finds the folio, holds onto it, locks the door behind it, and hands you the keys πŸ”‘


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./fs/ufs/util.c β€” go read the source, bestie, it's iconic 🧚


quick vibe check: this page lives in the Kernel API Manual and the source dir is ./fs/ufs. also the fn returns a struct folio *, so don't lose it πŸ™ˆ

and that's a wrap, bestie πŸŽ€ this came to you from ./fs/ufs, dated October 2026, page ufs_get_locked_folio(9) β€” periodt πŸ’…πŸ’œ

πŸ“¦ where this page comes from