diff --git a/include/linux/bootmem_info.h b/include/linux/bootmem_info.h index f724340755e5..486acc612703 100644 --- a/include/linux/bootmem_info.h +++ b/include/linux/bootmem_info.h @@ -44,12 +44,12 @@ static inline void free_bootmem_page(struct page *page) { enum bootmem_type type = bootmem_type(page); - VM_BUG_ON_PAGE(page_ref_count(page) != 2, page); - - if (type == SECTION_INFO || type == MIX_SECTION_INFO) + if (type == SECTION_INFO || type == MIX_SECTION_INFO) { + VM_WARN_ON_PAGE(page_ref_count(page) != 2, page); put_page_bootmem(page); - else - VM_BUG_ON_PAGE(1, page); + } else { + free_reserved_page(page); + } } #else static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)