From: Nitin Gupta Date: Wed, 12 Aug 2020 01:31:04 +0000 (-0700) Subject: mm: fix compile error due to COMPACTION_HPAGE_ORDER X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=25788738eb9ce46fe6a0fd84a3ceef5c795d41f0;p=linux.git mm: fix compile error due to COMPACTION_HPAGE_ORDER Fix compile error when COMPACTION_HPAGE_ORDER is assigned to HUGETLB_PAGE_ORDER. The correct way to check if this constant is defined is to check for CONFIG_HUGETLBFS. Reported-by: Nathan Chancellor Signed-off-by: Nitin Gupta Signed-off-by: Andrew Morton Tested-by: Nathan Chancellor Cc: Stephen Rothwell Link: http://lkml.kernel.org/r/20200623064544.25766-1-nigupta@nvidia.com Signed-off-by: Linus Torvalds --- diff --git a/mm/compaction.c b/mm/compaction.c index 544a98811c82f..ed8ea15116347 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -62,7 +62,7 @@ static const int HPAGE_FRAG_CHECK_INTERVAL_MSEC = 500; */ #if defined CONFIG_TRANSPARENT_HUGEPAGE #define COMPACTION_HPAGE_ORDER HPAGE_PMD_ORDER -#elif defined HUGETLB_PAGE_ORDER +#elif defined CONFIG_HUGETLBFS #define COMPACTION_HPAGE_ORDER HUGETLB_PAGE_ORDER #else #define COMPACTION_HPAGE_ORDER (PMD_SHIFT - PAGE_SHIFT)