kernels/linux-2.6.24/mm/filemap.c
/**
 * find_get_pages - gang pagecache lookup
 * @mapping:	The address_space to search
 * @start:	The starting page index
 * @nr_pages:	The maximum number of pages
 * @pages:	Where the resulting pages are placed
 *
 * find_get_pages() will search for and return a group of up to
 * @nr_pages pages in the mapping.  The pages are placed at @pages.
 * find_get_pages() takes a reference against the returned pages.
 *
 * The search returns a group of mapping-contiguous pages with ascending
 * indexes.  There may be holes in the indices due to not-present pages.
 *
 * find_get_pages() returns the number of pages which were found.
 */
gang pagecache lookup
@mapping:    The address_space to search
@start:      The starting page index
@nr_pages:   The maximum number of pages
@pages:      Where the resulting pages are placed

find_get_pages() will search for and return a group of up to
@nr_pages pages in the mapping.  The pages are placed at @pages.
find_get_pages() takes a reference against the returned pages.

The search returns a group of mapping-contiguous pages with ascending
indexes.  There may be holes in the indices due to not-present pages.

find_get_pages() returns the number of pages which were found.
gang pagecache lookup @mapping : The address_space to search @start : The starting page index @nr_pages : The maximum number of pages @pages : Where the resulting pages are placed find_get_pages () will search for and return a group of up to @nr_pages pages in the mapping . The pages are placed at @pages . find_get_pages () takes a reference against the returned pages . The search returns a group of mapping - contiguous pages with ascending indexes . There may be holes in the indices due to not - present pages . find_get_pages () returns the number of pages which were found .
unsigned find_get_pages(struct address_space *mapping, pgoff_t start,
			    unsigned int nr_pages, struct page **pages)
{
	unsigned int i;
	unsigned int ret;
	read_lock_irq(&mapping->tree_lock);
	ret = radix_tree_gang_lookup(&mapping->page_tree,
				(void **)pages, start, nr_pages);
	for (i = 0; i < ret; i++)
		page_cache_get(pages[i]);
	read_unlock_irq(&mapping->tree_lock);
	return ret;
}
unsigned find_get_pages ( struct address_space * mapping , pgoff_t start , unsigned int nr_pages , struct page * * pages ) { unsigned int i ; unsigned int ret ; read_lock_irq ( & mapping -> tree_lock ) ; ret = radix_tree_gang_lookup ( & mapping -> page_tree , ( void * * ) pages , start , nr_pages ) ; for ( i = 0 ; i < ret ; i ++ ) page_cache_get ( pages [ i ] ) ; read_unlock_irq ( & mapping -> tree_lock ) ; return ret ; }
find_get_pages - gang pagecache lookup
 @mapping:    The address_space to search
 @start:      The starting page index
 @nr_pages:   The maximum number of pages
 @pages:      Where the resulting pages are placed
find_get_pages - gang pagecache lookup @mapping : The address_space to search @start : The starting page index @nr_pages : The maximum number of pages @pages : Where the resulting pages are placed