diff options
author | Colin Cross <ccross@android.com> | 2011-06-29 13:54:42 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2011-06-29 13:54:42 -0700 |
commit | e55d4fa96762fd767a3b6d842c904e994db6bb2e (patch) | |
tree | c74157e01cb128cb97f106a50cfadc4c8b872c41 /mm/memory_hotplug.c | |
parent | e32c14667e4fe9f16ac9b918d15d29abd2315a55 (diff) | |
parent | b0af8dfdd67699e25083478c63eedef2e72ebd85 (diff) | |
download | kernel_samsung_crespo-e55d4fa96762fd767a3b6d842c904e994db6bb2e.zip kernel_samsung_crespo-e55d4fa96762fd767a3b6d842c904e994db6bb2e.tar.gz kernel_samsung_crespo-e55d4fa96762fd767a3b6d842c904e994db6bb2e.tar.bz2 |
Merge commit 'v3.0-rc5' into android-3.0
Diffstat (limited to 'mm/memory_hotplug.c')
-rw-r--r-- | mm/memory_hotplug.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 9f64637..c46887b 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -494,6 +494,14 @@ static pg_data_t __ref *hotadd_new_pgdat(int nid, u64 start) /* init node's zones as empty zones, we don't have any present pages.*/ free_area_init_node(nid, zones_size, start_pfn, zholes_size); + /* + * The node we allocated has no zone fallback lists. For avoiding + * to access not-initialized zonelist, build here. + */ + mutex_lock(&zonelists_mutex); + build_all_zonelists(NULL); + mutex_unlock(&zonelists_mutex); + return pgdat; } @@ -515,7 +523,7 @@ int mem_online_node(int nid) lock_memory_hotplug(); pgdat = hotadd_new_pgdat(nid, 0); - if (pgdat) { + if (!pgdat) { ret = -ENOMEM; goto out; } |