vfs: fix data corruption when blocksize < pagesize for mmaped data
[platform/adaptation/renesas_rcar/renesas_kernel.git] / mm / page_cgroup.c
index 6d757e3..cfd1628 100644 (file)
@@ -54,8 +54,9 @@ static int __init alloc_node_page_cgroup(int nid)
 
        table_size = sizeof(struct page_cgroup) * nr_pages;
 
-       base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),
-                       table_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS));
+       base = memblock_virt_alloc_try_nid_nopanic(
+                       table_size, PAGE_SIZE, __pa(MAX_DMA_ADDRESS),
+                       BOOTMEM_ALLOC_ACCESSIBLE, nid);
        if (!base)
                return -ENOMEM;
        NODE_DATA(nid)->node_page_cgroup = base;
@@ -451,7 +452,7 @@ unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id)
  * lookup_swap_cgroup_id - lookup mem_cgroup id tied to swap entry
  * @ent: swap entry to be looked up.
  *
- * Returns CSS ID of mem_cgroup at success. 0 at failure. (0 is invalid ID)
+ * Returns ID of mem_cgroup at success. 0 at failure. (0 is invalid ID)
  */
 unsigned short lookup_swap_cgroup_id(swp_entry_t ent)
 {