struct page **pages; unsigned int nr_pages, array_size, i;  nr_pages = (area->size - PAGE_SIZE) >> PAGE_SHIFT; array_size = (nr_pages * sizeof(struct page *));  area->nr_pages = nr_pages;  if (array_size > PAGE_SIZE) pages = __vmalloc(array_size, gfp_mask, PAGE_KERNEL); else pages = kmalloc(array_size, (gfp_mask & ~__GFP_HIGHMEM)); area->pages = pages; if (!area->pages) { remove_vm_area(area->addr); kfree(area); return NULL; } memset(area->pages, 0, array_size);  for (i = 0; i < area->nr_pages; i++) { area->pages[i] = alloc_page(gfp_mask); if (unlikely(!area->pages[i])) {  area->nr_pages = i; goto fail; } }  if (map_vm_area(area, prot, &pages)) goto fail; return area->addr;  fail: vfree(area->addr); return NULL;
return __vmalloc_area_node(area, gfp_mask, prot, -1);
void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot){	struct page **pages;	unsigned int nr_pages, array_size, i;	nr_pages = (area->size - PAGE_SIZE) >> PAGE_SHIFT;	array_size = (nr_pages * sizeof(struct page *));	area->nr_pages = nr_pages;	/* Please note that the recursion is strictly bounded. */	if (array_size > PAGE_SIZE)		pages = __vmalloc(array_size, gfp_mask, PAGE_KERNEL);	else		pages = kmalloc(array_size, (gfp_mask & ~__GFP_HIGHMEM));	area->pages = pages;	if (!area->pages) {		remove_vm_area(area->addr);		kfree(area);		return NULL;	}	memset(area->pages, 0, array_size);	for (i = 0; i < area->nr_pages; i++) {		area->pages[i] = alloc_page(gfp_mask);		if (unlikely(!area->pages[i])) {			/* Successfully allocated i pages, free them in __vunmap() */			area->nr_pages = i;			goto fail;		}	}	if (map_vm_area(area, prot, &pages))		goto fail;	return area->addr;fail:	vfree(area->addr);	return NULL;}