From 627260595ca6abcb16d68a3732bac6b547e112d6 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 10 Oct 2012 15:53:55 -0700 Subject: [PATCH] mm: compaction: fix bit ranges in {get,clear,set}_pageblock_skip() {get,clear,set}_pageblock_skip() use incorrect bit ranges (please compare to bit ranges used by {get,set}_pageblock_flags() used for migration types) and can overwrite pageblock migratetype of the next pageblock in the bitmap. Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Kyungmin Park Acked-by: Mel Gorman Tested-by: Thierry Reding Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/pageblock-flags.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h index eed27f4f4c3..be655e4a2a7 100644 --- a/include/linux/pageblock-flags.h +++ b/include/linux/pageblock-flags.h @@ -71,13 +71,13 @@ void set_pageblock_flags_group(struct page *page, unsigned long flags, #ifdef CONFIG_COMPACTION #define get_pageblock_skip(page) \ get_pageblock_flags_group(page, PB_migrate_skip, \ - PB_migrate_skip + 1) + PB_migrate_skip) #define clear_pageblock_skip(page) \ set_pageblock_flags_group(page, 0, PB_migrate_skip, \ - PB_migrate_skip + 1) + PB_migrate_skip) #define set_pageblock_skip(page) \ set_pageblock_flags_group(page, 1, PB_migrate_skip, \ - PB_migrate_skip + 1) + PB_migrate_skip) #endif /* CONFIG_COMPACTION */ #define get_pageblock_flags(page) \ -- 2.34.1