/* find_or_create_page() returns the desired page's address, or zero on memory exhaustion.  */
struct page* find_or_create_page(struct address_space *mapping, pgoff_t index, gfp_t gfp_mask)
/* find_or_create_page() returns the desired page's address, or zero on memory exhaustion.  */
struct page* find_or_create_page(struct address_space *mapping, pgoff_t index, gfp_t gfp_mask)
{
	struct page *page;
	int err;
repeat:
	page = find_lock_page(mapping, index);
	if (!page) {
		page = __page_cache_alloc(gfp_mask);
		if (!page)
			return NULL;
		err = add_to_page_cache_lru(page, mapping, index,
			(gfp_mask & GFP_RECLAIM_MASK));
		if (unlikely(err)) {
			page_cache_release(page);
			page = NULL;
			if (err == -EEXIST)
				goto repeat;
		}
	}
	return page;
}