mm/hugetlb: align cma on allocation order, not demotion order
[linux-2.6-block.git] / mm / hugetlb.c
index a7efb350f5d076fd3c3f4a13f3c108efba4395bf..33d175add04475a5a2664c8559888e4ecf757dd4 100644 (file)
@@ -7800,7 +7800,7 @@ void __init hugetlb_cma_reserve(int order)
                 * huge page demotion.
                 */
                res = cma_declare_contiguous_nid(0, size, 0,
-                                       PAGE_SIZE << HUGETLB_PAGE_ORDER,
+                                       PAGE_SIZE << order,
                                        HUGETLB_PAGE_ORDER, false, name,
                                        &hugetlb_cma[nid], nid);
                if (res) {