summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2008-12-09 22:14:20 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-12-10 17:01:53 +0100
commit653d22c0f5c41496c0e949ef5d141ab37c0b0580 (patch)
tree45754ea4067b21b9ff95a398494b239b5bb7005a /mm
parentrtc twl4030: rename ioctl function when RTC_INTF_DEV=n (diff)
downloadlinux-653d22c0f5c41496c0e949ef5d141ab37c0b0580.tar.xz
linux-653d22c0f5c41496c0e949ef5d141ab37c0b0580.zip
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 0b3cbf090a67..ab27ff750519 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),