aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_cgroup.c')
-rw-r--r--mm/page_cgroup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 6d757e3a872a..cfd162882c00 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -54,8 +54,9 @@ static int __init alloc_node_page_cgroup(int nid)
54 54
55 table_size = sizeof(struct page_cgroup) * nr_pages; 55 table_size = sizeof(struct page_cgroup) * nr_pages;
56 56
57 base = __alloc_bootmem_node_nopanic(NODE_DATA(nid), 57 base = memblock_virt_alloc_try_nid_nopanic(
58 table_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); 58 table_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS),
59 BOOTMEM_ALLOC_ACCESSIBLE, nid);
59 if (!base) 60 if (!base)
60 return -ENOMEM; 61 return -ENOMEM;
61 NODE_DATA(nid)->node_page_cgroup = base; 62 NODE_DATA(nid)->node_page_cgroup = base;
@@ -451,7 +452,7 @@ unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id)
451 * lookup_swap_cgroup_id - lookup mem_cgroup id tied to swap entry 452 * lookup_swap_cgroup_id - lookup mem_cgroup id tied to swap entry
452 * @ent: swap entry to be looked up. 453 * @ent: swap entry to be looked up.
453 * 454 *
454 * Returns CSS ID of mem_cgroup at success. 0 at failure. (0 is invalid ID) 455 * Returns ID of mem_cgroup at success. 0 at failure. (0 is invalid ID)
455 */ 456 */
456unsigned short lookup_swap_cgroup_id(swp_entry_t ent) 457unsigned short lookup_swap_cgroup_id(swp_entry_t ent)
457{ 458{