]> git.karo-electronics.de Git - linux-beck.git/blobdiff - mm/memory_hotplug.c
mm/hotplug: correctly setup fallback zonelists when creating new pgdat
[linux-beck.git] / mm / memory_hotplug.c
index 0d7e3ec8e0f3cc997b5fa0b422f5fa39caffe413..b8731040b9f9292f566f50d9f59b1112f87f104c 100644 (file)
@@ -513,7 +513,7 @@ int __ref online_pages(unsigned long pfn, unsigned long nr_pages)
        zone->present_pages += onlined_pages;
        zone->zone_pgdat->node_present_pages += onlined_pages;
        if (need_zonelists_rebuild)
-               build_all_zonelists(zone);
+               build_all_zonelists(NULL, zone);
        else
                zone_pcp_update(zone);
 
@@ -562,7 +562,7 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start)
         * to access not-initialized zonelist, build here.
         */
        mutex_lock(&zonelists_mutex);
-       build_all_zonelists(NULL);
+       build_all_zonelists(pgdat, NULL);
        mutex_unlock(&zonelists_mutex);
 
        return pgdat;
@@ -618,7 +618,7 @@ int __ref add_memory(int nid, u64 start, u64 size)
                pgdat = hotadd_new_pgdat(nid, start);
                ret = -ENOMEM;
                if (!pgdat)
-                       goto out;
+                       goto error;
                new_pgdat = 1;
        }