diff options
Diffstat (limited to 'kernel/power/swsusp.c')
-rw-r--r-- | kernel/power/swsusp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index fc50b5d2dd26..f6abfdb0a02a 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -550,14 +550,14 @@ static int write_suspend_image(void) | |||
550 | * We should only consider resume_device. | 550 | * We should only consider resume_device. |
551 | */ | 551 | */ |
552 | 552 | ||
553 | int enough_swap(void) | 553 | int enough_swap(unsigned nr_pages) |
554 | { | 554 | { |
555 | struct sysinfo i; | 555 | struct sysinfo i; |
556 | 556 | ||
557 | si_swapinfo(&i); | 557 | si_swapinfo(&i); |
558 | pr_debug("swsusp: available swap: %lu pages\n", i.freeswap); | 558 | pr_debug("swsusp: available swap: %lu pages\n", i.freeswap); |
559 | return i.freeswap > (nr_copy_pages + PAGES_FOR_IO + | 559 | return i.freeswap > (nr_pages + PAGES_FOR_IO + |
560 | nr_copy_pages/PBES_PER_PAGE + !!(nr_copy_pages%PBES_PER_PAGE)); | 560 | (nr_pages + PBES_PER_PAGE - 1) / PBES_PER_PAGE); |
561 | } | 561 | } |
562 | 562 | ||
563 | 563 | ||