FIND_OR_CREATE_PAGE

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

find_or_create_page - locate or add a pagecache page  

SYNOPSIS

"SYNOPSIS"

struct page * find_or_create_page (struct address_space * mapping, unsigned long index, unsigned int gfp_mask);  

ARGUMENTS

mapping
the page's address_space
index
the page's index into the mapping
gfp_mask
page allocation mode
 

DESCRIPTION

Locates a page in the pagecache. If the page is not present, a new page is allocated using gfp_mask and is added to the pagecache and to the VM's LRU list. The returned page is locked and has its reference count incremented.

find_or_create_page may sleep, even if gfp_flags specifies an atomic allocation!

find_or_create_page returns the desired page's address, or zero on memory exhaustion.  

DESCRIPTION

Locates a page in the pagecache. If the page is not present, a new page is allocated using gfp_mask and is added to the pagecache and to the VM's LRU list. The returned page is locked and has its reference count incremented.

find_or_create_page may sleep, even if gfp_flags specifies an atomic allocation!

find_or_create_page returns the desired page's address, or zero on memory exhaustion.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 00:02:09 GMT, October 09, 2005