/* snapshot_write_finalize - must be called after the last call to snapshot_write_next() in case the last page in the image happens to be a highmem page and its contents should be stored in the highmem. Additionally, it releases the memory that will not be used any more.  */
void snapshot_write_finalize(struct snapshot_handle *handle)
/* snapshot_write_finalize - must be called after the last call to snapshot_write_next() in case the last page in the image happens to be a highmem page and its contents should be stored in the highmem. Additionally, it releases the memory that will not be used any more.  */
void snapshot_write_finalize(struct snapshot_handle *handle)
{
	copy_last_highmem_page();
	if (handle->prev && handle->cur > nr_meta_pages + nr_copy_pages) {
		memory_bm_free(&orig_bm, PG_UNSAFE_CLEAR);
		free_highmem_data();
	}
}