diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 279dc0c96568..fff03a331314 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2405,8 +2405,10 @@ void *vmap(struct page **pages, unsigned int count, return NULL; } - if (flags & VM_MAP_PUT_PAGES) + if (flags & VM_MAP_PUT_PAGES) { area->pages = pages; + area->nr_pages = count; + } return area->addr; } EXPORT_SYMBOL(vmap);