summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2008-12-09 21:14:20 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-10 16:01:53 (GMT)
commit653d22c0f5c41496c0e949ef5d141ab37c0b0580 (patch)
tree45754ea4067b21b9ff95a398494b239b5bb7005a /mm
parentcc61686001b1368724d1c38805c27e5021cd85ed (diff)
downloadlinux-653d22c0f5c41496c0e949ef5d141ab37c0b0580.tar.xz
page_cgroup should ignore empty nodes
Fix a total bootup freeze on ia64. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Tested-by: Li Zefan <lizf@cn.fujitsu.com> Reported-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_cgroup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 0b3cbf0..ab27ff7 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -49,6 +49,9 @@ static int __init alloc_node_page_cgroup(int nid)
start_pfn = NODE_DATA(nid)->node_start_pfn;
nr_pages = NODE_DATA(nid)->node_spanned_pages;
+ if (!nr_pages)
+ return 0;
+
table_size = sizeof(struct page_cgroup) * nr_pages;
base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),