Skip to content

Commit

Permalink
mm: compaction: fix bit ranges in {get,clear,set}_pageblock_skip()
Browse files Browse the repository at this point in the history
{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 <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mel Gorman <mgorman@suse.de>
Tested-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Linus Torvalds committed Oct 10, 2012
1 parent 1633dbb commit 6272605
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/pageblock-flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit 6272605

Please sign in to comment.