Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / arch / x86 / mm / highmem_32.c
index 252b8f5..4500142 100644 (file)
@@ -1,6 +1,7 @@
 #include <linux/highmem.h>
 #include <linux/module.h>
 #include <linux/swap.h> /* for totalram_pages */
+#include <linux/bootmem.h>
 
 void *kmap(struct page *page)
 {
@@ -121,6 +122,11 @@ void __init set_highmem_pages_init(void)
        struct zone *zone;
        int nid;
 
+       /*
+        * Explicitly reset zone->managed_pages because set_highmem_pages_init()
+        * is invoked before free_all_bootmem()
+        */
+       reset_all_zones_managed_pages();
        for_each_zone(zone) {
                unsigned long zone_start_pfn, zone_end_pfn;