OSDN Git Service

mm/pageblock: throw compile error if pageblock_bits cannot hold MIGRATE_TYPES
[uclinux-h8/linux.git] / mm / page_alloc.c
index b4fcf21..cd1c9d3 100644 (file)
@@ -431,6 +431,7 @@ void set_pfnblock_flags_mask(struct page *page, unsigned long flags,
        unsigned long old_word, word;
 
        BUILD_BUG_ON(NR_PAGEBLOCK_BITS != 4);
+       BUILD_BUG_ON(MIGRATE_TYPES > (1 << PB_migratetype_bits));
 
        bitmap = get_pageblock_bitmap(page, pfn);
        bitidx = pfn_to_bitidx(page, pfn);