From: Wang Xiaoqiang Date: Sat, 16 Jan 2016 00:57:13 +0000 (-0800) Subject: mm/page_isolation: do some cleanup in "undo_isolate_page_range" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6f8d2b8a262c6b71e1464d488f41cccf9aafbc07;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mm/page_isolation: do some cleanup in "undo_isolate_page_range" Use "IS_ALIGNED" to judge the alignment, rather than directly judging. Signed-off-by: Wang Xiaoqiang Cc: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 5e139fec6c6c..92c4c36501e7 100644 --- a/mm/page_isolation.c +++ b/mm/page_isolation.c @@ -196,8 +196,10 @@ int undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn, { unsigned long 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; pfn += pageblock_nr_pages) {