Commit 62726059 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Acked-by: default avatarMel Gorman <mgorman@suse.de>
Tested-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
Acked-by: default avatarMinchan Kim <minchan@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 1633dbba
...@@ -71,13 +71,13 @@ void set_pageblock_flags_group(struct page *page, unsigned long flags, ...@@ -71,13 +71,13 @@ void set_pageblock_flags_group(struct page *page, unsigned long flags,
#ifdef CONFIG_COMPACTION #ifdef CONFIG_COMPACTION
#define get_pageblock_skip(page) \ #define get_pageblock_skip(page) \
get_pageblock_flags_group(page, PB_migrate_skip, \ get_pageblock_flags_group(page, PB_migrate_skip, \
PB_migrate_skip + 1) PB_migrate_skip)
#define clear_pageblock_skip(page) \ #define clear_pageblock_skip(page) \
set_pageblock_flags_group(page, 0, PB_migrate_skip, \ set_pageblock_flags_group(page, 0, PB_migrate_skip, \
PB_migrate_skip + 1) PB_migrate_skip)
#define set_pageblock_skip(page) \ #define set_pageblock_skip(page) \
set_pageblock_flags_group(page, 1, PB_migrate_skip, \ set_pageblock_flags_group(page, 1, PB_migrate_skip, \
PB_migrate_skip + 1) PB_migrate_skip)
#endif /* CONFIG_COMPACTION */ #endif /* CONFIG_COMPACTION */
#define get_pageblock_flags(page) \ #define get_pageblock_flags(page) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment