From e19c7341563cc31a9a3b28255d32e03c5b7fc5a1 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Fri, 23 May 2008 23:28:57 +0000 Subject: There is a bug in the new image saving code causing it to fail if more than one extents page is used (more likely to happen in case of a compressed image). Fix it. --- suspend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/suspend.c b/suspend.c index b7f7faf..07984ac 100644 --- a/suspend.c +++ b/suspend.c @@ -694,8 +694,10 @@ static loff_t next_swap_page(struct swap_map_handle *handle) if (handle->cur_extent->start < handle->cur_extent->end) { ext = *handle->cur_extent; memset(handle->cur_extent, 0, sizeof(struct extent)); + handle->nr_extents = 1; } else { memset(&ext, 0, sizeof(struct extent)); + handle->nr_extents = 0; } if (save_extents(handle, 0)) return 0; -- cgit 1.2.3-korg