diff options
Diffstat (limited to 'kernel/power/swap.c')
-rw-r--r-- | kernel/power/swap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 8309d20b2563..9b2ee5344dee 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
@@ -331,8 +331,7 @@ static int enough_swap(unsigned int nr_pages) | |||
331 | unsigned int free_swap = count_swap_pages(root_swap, 1); | 331 | unsigned int free_swap = count_swap_pages(root_swap, 1); |
332 | 332 | ||
333 | pr_debug("swsusp: free swap pages: %u\n", free_swap); | 333 | pr_debug("swsusp: free swap pages: %u\n", free_swap); |
334 | return free_swap > (nr_pages + PAGES_FOR_IO + | 334 | return free_swap > nr_pages + PAGES_FOR_IO; |
335 | (nr_pages + PBES_PER_PAGE - 1) / PBES_PER_PAGE); | ||
336 | } | 335 | } |
337 | 336 | ||
338 | /** | 337 | /** |
@@ -547,6 +546,7 @@ static int load_image(struct swap_map_handle *handle, | |||
547 | error = err2; | 546 | error = err2; |
548 | if (!error) { | 547 | if (!error) { |
549 | printk("\b\b\b\bdone\n"); | 548 | printk("\b\b\b\bdone\n"); |
549 | snapshot_free_unused_memory(snapshot); | ||
550 | if (!snapshot_image_loaded(snapshot)) | 550 | if (!snapshot_image_loaded(snapshot)) |
551 | error = -ENODATA; | 551 | error = -ENODATA; |
552 | } | 552 | } |