diff options
author | Namhyung Kim <namhyung.kim@lge.com> | 2012-01-19 23:23:10 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-01-19 23:23:10 +0100 |
commit | 160cb5a97daef0cb894685d84c9d4700bb7cccb4 (patch) | |
tree | 91b8fd151fad423572a686ee94295a84754c0347 /kernel/power/snapshot.c | |
parent | 5eb6f9ad96967be4e0da55521a253e11b534bd3f (diff) |
PM / Hibernate: Correct additional pages number calculation
The struct bm_block is allocated by chain_alloc(),
so it'd better counting it in LINKED_PAGE_DATA_SIZE.
Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power/snapshot.c')
-rw-r--r-- | kernel/power/snapshot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 1cf88900ec4..6a768e53700 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -812,7 +812,8 @@ unsigned int snapshot_additional_pages(struct zone *zone) unsigned int res; res = DIV_ROUND_UP(zone->spanned_pages, BM_BITS_PER_BLOCK); - res += DIV_ROUND_UP(res * sizeof(struct bm_block), PAGE_SIZE); + res += DIV_ROUND_UP(res * sizeof(struct bm_block), + LINKED_PAGE_DATA_SIZE); return 2 * res; } |