ufs_get_locked_folio(9)
π 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β theaddress_spaceto 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 astruct 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
- 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