diff options
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r-- | kernel/power/snapshot.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index b8a2e9a63206..4a6dbcefd378 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -88,8 +88,7 @@ static int save_highmem_zone(struct zone *zone) | |||
88 | return 0; | 88 | return 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | 91 | int save_highmem(void) | |
92 | static int save_highmem(void) | ||
93 | { | 92 | { |
94 | struct zone *zone; | 93 | struct zone *zone; |
95 | int res = 0; | 94 | int res = 0; |
@@ -120,11 +119,7 @@ int restore_highmem(void) | |||
120 | } | 119 | } |
121 | return 0; | 120 | return 0; |
122 | } | 121 | } |
123 | #else | 122 | #endif |
124 | static int save_highmem(void) { return 0; } | ||
125 | int restore_highmem(void) { return 0; } | ||
126 | #endif /* CONFIG_HIGHMEM */ | ||
127 | |||
128 | 123 | ||
129 | static int pfn_is_nosave(unsigned long pfn) | 124 | static int pfn_is_nosave(unsigned long pfn) |
130 | { | 125 | { |
@@ -416,11 +411,6 @@ asmlinkage int swsusp_save(void) | |||
416 | unsigned int nr_pages; | 411 | unsigned int nr_pages; |
417 | 412 | ||
418 | pr_debug("swsusp: critical section: \n"); | 413 | pr_debug("swsusp: critical section: \n"); |
419 | if (save_highmem()) { | ||
420 | printk(KERN_CRIT "swsusp: Not enough free pages for highmem\n"); | ||
421 | restore_highmem(); | ||
422 | return -ENOMEM; | ||
423 | } | ||
424 | 414 | ||
425 | drain_local_pages(); | 415 | drain_local_pages(); |
426 | nr_pages = count_data_pages(); | 416 | nr_pages = count_data_pages(); |
@@ -440,11 +430,6 @@ asmlinkage int swsusp_save(void) | |||
440 | return -ENOMEM; | 430 | return -ENOMEM; |
441 | } | 431 | } |
442 | 432 | ||
443 | if (!enough_swap(nr_pages)) { | ||
444 | printk(KERN_ERR "swsusp: Not enough free swap\n"); | ||
445 | return -ENOSPC; | ||
446 | } | ||
447 | |||
448 | pagedir_nosave = swsusp_alloc(nr_pages); | 433 | pagedir_nosave = swsusp_alloc(nr_pages); |
449 | if (!pagedir_nosave) | 434 | if (!pagedir_nosave) |
450 | return -ENOMEM; | 435 | return -ENOMEM; |