/* We need to bale out if page->mapping is no longer equal to the original mapping. This happens a) when the VM reclaimed the page while we waited on its lock, b) when a concurrent invalidate_mapping_pages got there first and c) when tmpfs swizzles a page between a tmpfs inode and swapper_space.  */
static int truncate_complete_page(struct address_space *mapping, struct page *page)
/* We need to bale out if page->mapping is no longer equal to the original mapping. This happens a) when the VM reclaimed the page while we waited on its lock, b) when a concurrent invalidate_mapping_pages got there first and c) when tmpfs swizzles a page between a tmpfs inode and swapper_space.  */
static int truncate_complete_page(struct address_space *mapping, struct page *page)
{
	if (page->mapping != mapping)
		return -EIO;
	if (page_has_private(page))
		do_invalidatepage(page, 0);
	cancel_dirty_page(page, PAGE_CACHE_SIZE);
	clear_page_mlock(page);
	remove_from_page_cache(page);
	ClearPageMappedToDisk(page);
	page_cache_release(page);
	return 0;
}