]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - kernel/power/snapshot.c
PM / Hibernate: Correct additional pages number calculation
[karo-tx-linux.git] / kernel / power / snapshot.c
index 1cf88900ec4fdc162b6ad1250d2c4d13d3895458..6a768e537001ce653e61c080baec76fbc5570da0 100644 (file)
@@ -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;
 }