kernels/linux-2.6.24/mm/filemap.c
/**
 * find_get_pages_tag - find and return pages that match @tag
 * @mapping:	the address_space to search
 * @index:	the starting page index
 * @tag:	the tag index
 * @nr_pages:	the maximum number of pages
 * @pages:	where the resulting pages are placed
 *
 * Like find_get_pages, except we only return pages which are tagged with
 * @tag.   We update @index to index the next page for the traversal.
 */


Like find_get_pages, except we only return pages which are tagged with
@tag.   We update @index to index the next page for the traversal.
Like find_get_pages except we only return pages which are tagged with @tag . We update @index to index the next page for the traversal .
unsigned find_get_pages_tag(struct address_space *mapping, pgoff_t *index,
			int tag, unsigned int nr_pages, struct page **pages)
{
	unsigned int i;
	unsigned int ret;
	read_lock_irq(&mapping->tree_lock);
	ret = radix_tree_gang_lookup_tag(&mapping->page_tree,
				(void **)pages, *index, nr_pages, tag);
	for (i = 0; i < ret; i++)
		page_cache_get(pages[i]);
	if (ret)
		*index = pages[ret - 1]->index + 1;
	read_unlock_irq(&mapping->tree_lock);
	return ret;
}
unsigned find_get_pages_tag ( struct address_space * mapping , pgoff_t * index , int tag , unsigned int nr_pages , struct page * * pages ) { unsigned int i ; unsigned int ret ; read_lock_irq ( & mapping -> tree_lock ) ; ret = radix_tree_gang_lookup_tag ( & mapping -> page_tree , ( void * * ) pages , * index , nr_pages , tag ) ; for ( i = 0 ; i < ret ; i ++ ) page_cache_get ( pages [ i ] ) ; if ( ret ) * index = pages [ ret - 1 ] -> index + 1 ; read_unlock_irq ( & mapping -> tree_lock ) ; return ret ; }
find_get_pages_tag - find and return pages that match @tag
 @mapping:    the address_space to search
 @index:      the starting page index
 @tag:        the tag index
 @nr_pages:   the maximum number of pages
 @pages:      where the resulting pages are placed
find_get_pages_tag - find and return pages that match @tag @mapping : the address_space to search @index : the starting page index @tag : the tag index @nr_pages : the maximum number of pages @pages : where the resulting pages are placed