aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pageblock-flags.h
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2012-10-10 18:53:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-10 19:50:14 -0400
commit627260595ca6abcb16d68a3732bac6b547e112d6 (patch)
treee129ac3500e1636f6b1e2ffaf3cd1443557af32c /include/linux/pageblock-flags.h
parent1633dbbacbaa3a2f95ef901caf9d0b32728c10b6 (diff)
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>
Diffstat (limited to 'include/linux/pageblock-flags.h')
-rw-r--r--include/linux/pageblock-flags.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h
index eed27f4f4c3e..be655e4a2a75 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,
71#ifdef CONFIG_COMPACTION 71#ifdef CONFIG_COMPACTION
72#define get_pageblock_skip(page) \ 72#define get_pageblock_skip(page) \
73 get_pageblock_flags_group(page, PB_migrate_skip, \ 73 get_pageblock_flags_group(page, PB_migrate_skip, \
74 PB_migrate_skip + 1) 74 PB_migrate_skip)
75#define clear_pageblock_skip(page) \ 75#define clear_pageblock_skip(page) \
76 set_pageblock_flags_group(page, 0, PB_migrate_skip, \ 76 set_pageblock_flags_group(page, 0, PB_migrate_skip, \
77 PB_migrate_skip + 1) 77 PB_migrate_skip)
78#define set_pageblock_skip(page) \ 78#define set_pageblock_skip(page) \
79 set_pageblock_flags_group(page, 1, PB_migrate_skip, \ 79 set_pageblock_flags_group(page, 1, PB_migrate_skip, \
80 PB_migrate_skip + 1) 80 PB_migrate_skip)
81#endif /* CONFIG_COMPACTION */ 81#endif /* CONFIG_COMPACTION */
82 82
83#define get_pageblock_flags(page) \ 83#define get_pageblock_flags(page) \