Skip to content

Commit 6272605

Browse files
bzolniertorvalds
authored andcommitted
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 <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>
1 parent 1633dbb commit 6272605

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/linux/pageblock-flags.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ void set_pageblock_flags_group(struct page *page, unsigned long flags,
7171
#ifdef CONFIG_COMPACTION
7272
#define get_pageblock_skip(page) \
7373
get_pageblock_flags_group(page, PB_migrate_skip, \
74-
PB_migrate_skip + 1)
74+
PB_migrate_skip)
7575
#define clear_pageblock_skip(page) \
7676
set_pageblock_flags_group(page, 0, PB_migrate_skip, \
77-
PB_migrate_skip + 1)
77+
PB_migrate_skip)
7878
#define set_pageblock_skip(page) \
7979
set_pageblock_flags_group(page, 1, PB_migrate_skip, \
80-
PB_migrate_skip + 1)
80+
PB_migrate_skip)
8181
#endif /* CONFIG_COMPACTION */
8282

8383
#define get_pageblock_flags(page) \

0 commit comments

Comments
 (0)