/* allocate an array of pointers of struct page  */
static struct page** relay_alloc_page_array(unsigned int n_pages)
/* allocate an array of pointers of struct page  */
static struct page** relay_alloc_page_array(unsigned int n_pages)
{
	struct page **array;
	size_t pa_size = n_pages * sizeof(struct page *);
	if (pa_size > PAGE_SIZE) {
		array = vmalloc(pa_size);
		if (array)
			memset(array, 0, pa_size);
	} else {
		array = kzalloc(pa_size, GFP_KERNEL);
	}
	return array;
}