summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorWang Xiaoqiang <wangxq10@lzu.edu.cn>2016-01-15 16:57:13 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-15 17:56:32 -0800
commit6f8d2b8a262c6b71e1464d488f41cccf9aafbc07 (patch)
tree868bad4330d885f714fce601f02a69893082718f /mm
parent036fbb21de7c74d5637bf41110c47005363f3000 (diff)
downloadop-kernel-dev-6f8d2b8a262c6b71e1464d488f41cccf9aafbc07.zip
op-kernel-dev-6f8d2b8a262c6b71e1464d488f41cccf9aafbc07.tar.gz
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 <wang_xiaoq@126.com> Cc: 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>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_isolation.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 5e139fe..92c4c36 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) {
OpenPOWER on IntegriCloud