linux/mmnommu/filemap.c
/*
 * Read into the page cache. If a page already exists,
 * and Page_Uptodate() is not set, try to fill the page.
 */
Read into the page cache. If a page already exists,
and Page_Uptodate() is not set, try to fill the page.
Read into the page cache . If a page already exists and Page_Uptodate () is not set try to fill the page .
struct page *read_cache_page(struct address_space *mapping,
				unsigned long index,
				int (*filler)(void *,struct page*),
				void *data)
{
	struct page *page;
	int err;
retry:
	page = __read_cache_page(mapping, index, filler, data);
	if (IS_ERR(page) || Page_Uptodate(page))
		goto out;
	lock_page(page);
	if (!page->mapping) {
		UnlockPage(page);
		page_cache_release(page);
		goto retry;
	}
	if (Page_Uptodate(page)) {
		UnlockPage(page);
		goto out;
	}
	err = filler(data, page);
	if (err < 0) {
		page_cache_release(page);
		page = ERR_PTR(err);
	}
 out:
	return page;
}
struct page * read_cache_page ( struct address_space * mapping , unsigned long index , int ( * filler ) ( void * , struct page * ) , void * data ) { struct page * page ; int err ; retry : page = __read_cache_page ( mapping , index , filler , data ) ; if ( IS_ERR ( page ) || Page_Uptodate ( page ) ) goto out ; lock_page ( page ) ; if ( ! page -> mapping ) { UnlockPage ( page ) ; page_cache_release ( page ) ; goto retry ; } if ( Page_Uptodate ( page ) ) { UnlockPage ( page ) ; goto out ; } err = filler ( data , page ) ; if ( err < 0 ) { page_cache_release ( page ) ; page = ERR_PTR ( err ) ; } out : return page ; }
Read into the page cache.
Read into the page cache .