diff options
-rw-r--r-- | kernel/power/snapshot.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index ccc95ac07bed..78039b477d2b 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -1005,11 +1005,12 @@ copy_data_pages(struct memory_bitmap *copy_bm, struct memory_bitmap *orig_bm) | |||
1005 | } | 1005 | } |
1006 | memory_bm_position_reset(orig_bm); | 1006 | memory_bm_position_reset(orig_bm); |
1007 | memory_bm_position_reset(copy_bm); | 1007 | memory_bm_position_reset(copy_bm); |
1008 | do { | 1008 | for(;;) { |
1009 | pfn = memory_bm_next_pfn(orig_bm); | 1009 | pfn = memory_bm_next_pfn(orig_bm); |
1010 | if (likely(pfn != BM_END_OF_MAP)) | 1010 | if (unlikely(pfn == BM_END_OF_MAP)) |
1011 | copy_data_page(memory_bm_next_pfn(copy_bm), pfn); | 1011 | break; |
1012 | } while (pfn != BM_END_OF_MAP); | 1012 | copy_data_page(memory_bm_next_pfn(copy_bm), pfn); |
1013 | } | ||
1013 | } | 1014 | } |
1014 | 1015 | ||
1015 | /* Total number of image pages */ | 1016 | /* Total number of image pages */ |