diff options
-rw-r--r-- | kernel/power/swap.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 044b8e0c1025..a57c661c7e8a 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
@@ -263,7 +263,6 @@ int swsusp_write(void) | |||
263 | struct swap_map_handle handle; | 263 | struct swap_map_handle handle; |
264 | struct snapshot_handle snapshot; | 264 | struct snapshot_handle snapshot; |
265 | struct swsusp_info *header; | 265 | struct swsusp_info *header; |
266 | unsigned long start; | ||
267 | int error; | 266 | int error; |
268 | 267 | ||
269 | if ((error = swsusp_swap_check())) { | 268 | if ((error = swsusp_swap_check())) { |
@@ -281,16 +280,17 @@ int swsusp_write(void) | |||
281 | } | 280 | } |
282 | error = get_swap_writer(&handle); | 281 | error = get_swap_writer(&handle); |
283 | if (!error) { | 282 | if (!error) { |
284 | start = handle.cur_swap; | 283 | unsigned long start = handle.cur_swap; |
285 | error = swap_write_page(&handle, header); | 284 | error = swap_write_page(&handle, header); |
286 | } | 285 | if (!error) |
287 | if (!error) | 286 | error = save_image(&handle, &snapshot, |
288 | error = save_image(&handle, &snapshot, header->pages - 1); | 287 | header->pages - 1); |
289 | if (!error) { | 288 | if (!error) { |
290 | flush_swap_writer(&handle); | 289 | flush_swap_writer(&handle); |
291 | printk("S"); | 290 | printk("S"); |
292 | error = mark_swapfiles(swp_entry(root_swap, start)); | 291 | error = mark_swapfiles(swp_entry(root_swap, start)); |
293 | printk("|\n"); | 292 | printk("|\n"); |
293 | } | ||
294 | } | 294 | } |
295 | if (error) | 295 | if (error) |
296 | free_all_swap_pages(root_swap, handle.bitmap); | 296 | free_all_swap_pages(root_swap, handle.bitmap); |