aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/page_cgroup.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 8e7577cdf5e4..a12cc3fa9859 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -153,11 +153,11 @@ static void free_page_cgroup(void *addr)
153 vfree(addr); 153 vfree(addr);
154 } else { 154 } else {
155 struct page *page = virt_to_page(addr); 155 struct page *page = virt_to_page(addr);
156 if (!PageReserved(page)) { /* Is bootmem ? */ 156 size_t table_size =
157 size_t table_size = 157 sizeof(struct page_cgroup) * PAGES_PER_SECTION;
158 sizeof(struct page_cgroup) * PAGES_PER_SECTION; 158
159 free_pages_exact(addr, table_size); 159 BUG_ON(PageReserved(page));
160 } 160 free_pages_exact(addr, table_size);
161 } 161 }
162} 162}
163#endif 163#endif