diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 2eda40741aaac298236682bbaeb21b52041934ec..830cadecbdfcf2c9f7adedeca5cb6e1f169f8e87 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -1181,7 +1181,7 @@ static void free_unnecessary_pages(void) memory_bm_position_reset(©_bm); - while (to_free_normal > 0 && to_free_highmem > 0) { + while (to_free_normal > 0 || to_free_highmem > 0) { unsigned long pfn = memory_bm_next_pfn(©_bm); struct page *page = pfn_to_page(pfn);