hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID4AGC -------------------------------- When CONFIG_COMPACTION and CONFIG_CMA aren't defined, MAX_PAGE_ORDER isn't defined, but it is still used. To fit it, move MAX_PAGE_ORDER definition out of #ifdef. Fixes: af879363ce88 ("mm/compaction: introduce NR_PAGE_ORDERS and MAX_PAGE_ORDER") Signed-off-by: Jinjiang Tu <tujinjiang@huawei.com> --- include/linux/mmzone.h | 2 ++ mm/internal.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index afc35b8cb44e..b831463c2e6e 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -33,6 +33,8 @@ #endif #define MAX_ORDER_NR_PAGES (1 << MAX_ORDER) +#define MAX_PAGE_ORDER MAX_ORDER + #define IS_MAX_ORDER_ALIGNED(pfn) IS_ALIGNED(pfn, MAX_ORDER_NR_PAGES) #define NR_PAGE_ORDERS (MAX_ORDER + 1) diff --git a/mm/internal.h b/mm/internal.h index 3a127c3e2325..71e6f523175d 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -716,8 +716,6 @@ void memmap_init_range(unsigned long, int, unsigned long, unsigned long, #if defined CONFIG_COMPACTION || defined CONFIG_CMA -#define MAX_PAGE_ORDER MAX_ORDER - /* * in mm/compaction.c */ -- 2.43.0