table of contents
- stretch 4.9.168-1
PAGECACHE_GET_PAGE(9) | Memory Management in Linux | PAGECACHE_GET_PAGE(9) |
NAME¶
pagecache_get_page - find and get a page referenceSYNOPSIS¶
struct page * pagecache_get_page(struct address_space * mapping, pgoff_t offset, int fgp_flags, gfp_t gfp_mask);
ARGUMENTS¶
mappingoffset
fgp_flags
gfp_mask
DESCRIPTION¶
Looks up the page cache slot at mapping & offset.PCG flags modify how the page is returned.
FGP_ACCESSED: the page will be marked accessed FGP_LOCK: Page is return locked FGP_CREAT: If page is not present then a new page is allocated using gfp_mask and added to the page cache and the VM's LRU list. The page is returned locked and with an increased refcount. Otherwise, NULL is returned.
If FGP_LOCK or FGP_CREAT are specified then the function may sleep even if the GFP flags specified for FGP_CREAT are atomic.
If there is a page cache page, it is returned with an increased refcount.
COPYRIGHT¶
April 2019 | Kernel Hackers Manual 4.9. |