mm/page_isolation: use macro to judge the alignment
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Thu, 14 Jan 2016 23:22:13 +0000 (15:22 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Jan 2016 00:00:49 +0000 (16:00 -0800)
Signed-off-by: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_isolation.c

index f484b9300fe325c9031866d07d793c99e0a6a178..5e139fec6c6cc95a68c01d0841a5d41b05a20120 100644 (file)
@@ -165,8 +165,8 @@ int start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
        unsigned long undo_pfn;
        struct page *page;
 
-       BUG_ON((start_pfn) & (pageblock_nr_pages - 1));
-       BUG_ON((end_pfn) & (pageblock_nr_pages - 1));
+       BUG_ON(!IS_ALIGNED(start_pfn, pageblock_nr_pages));
+       BUG_ON(!IS_ALIGNED(end_pfn, pageblock_nr_pages));
 
        for (pfn = start_pfn;
             pfn < end_pfn;