projects
/
profile
/
common
/
kernel-common.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5eb6f9a
)
PM / Hibernate: Correct additional pages number calculation
author
Namhyung Kim
<namhyung.kim@lge.com>
Thu, 19 Jan 2012 22:23:10 +0000
(23:23 +0100)
committer
Rafael J. Wysocki
<rjw@sisk.pl>
Thu, 19 Jan 2012 22:23:10 +0000
(23:23 +0100)
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>
kernel/power/snapshot.c
patch
|
blob
|
history
diff --git
a/kernel/power/snapshot.c
b/kernel/power/snapshot.c
index
1cf8890
..
6a768e5
100644
(file)
--- 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;
}