aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/snapshot.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r--kernel/power/snapshot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 36cb168e4330..be861c26dda7 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -26,6 +26,7 @@
26#include <linux/console.h> 26#include <linux/console.h>
27#include <linux/highmem.h> 27#include <linux/highmem.h>
28#include <linux/list.h> 28#include <linux/list.h>
29#include <linux/slab.h>
29 30
30#include <asm/uaccess.h> 31#include <asm/uaccess.h>
31#include <asm/mmu_context.h> 32#include <asm/mmu_context.h>
@@ -1181,7 +1182,7 @@ static void free_unnecessary_pages(void)
1181 1182
1182 memory_bm_position_reset(&copy_bm); 1183 memory_bm_position_reset(&copy_bm);
1183 1184
1184 while (to_free_normal > 0 && to_free_highmem > 0) { 1185 while (to_free_normal > 0 || to_free_highmem > 0) {
1185 unsigned long pfn = memory_bm_next_pfn(&copy_bm); 1186 unsigned long pfn = memory_bm_next_pfn(&copy_bm);
1186 struct page *page = pfn_to_page(pfn); 1187 struct page *page = pfn_to_page(pfn);
1187 1188
@@ -1500,7 +1501,7 @@ asmlinkage int swsusp_save(void)
1500{ 1501{
1501 unsigned int nr_pages, nr_highmem; 1502 unsigned int nr_pages, nr_highmem;
1502 1503
1503 printk(KERN_INFO "PM: Creating hibernation image: \n"); 1504 printk(KERN_INFO "PM: Creating hibernation image:\n");
1504 1505
1505 drain_local_pages(NULL); 1506 drain_local_pages(NULL);
1506 nr_pages = count_data_pages(); 1507 nr_pages = count_data_pages();