/* Note that this function upgrades page to ksm page: if one of the pages is already a ksm page, try_to_merge_with_ksm_page should be used.  */
static struct page* try_to_merge_two_pages(struct rmap_item *rmap_item, struct page *page, struct rmap_item *tree_rmap_item, struct page *tree_page)
/* Note that this function upgrades page to ksm page: if one of the pages is already a ksm page, try_to_merge_with_ksm_page should be used.  */
static struct page* try_to_merge_two_pages(struct rmap_item *rmap_item, struct page *page, struct rmap_item *tree_rmap_item, struct page *tree_page)
{
	int err;
	err = try_to_merge_with_ksm_page(rmap_item, page, NULL);
	if (!err) {
		err = try_to_merge_with_ksm_page(tree_rmap_item,
							tree_page, page);
		if (err)
			break_cow(rmap_item);
	}
	return err ? NULL : page;
}