diff options
Diffstat (limited to 'kernel/power/swap.c')
| -rw-r--r-- | kernel/power/swap.c | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index b0bb21778391..5d0059eed3e4 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c  | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | * This file provides functions for reading the suspend image from | 4 | * This file provides functions for reading the suspend image from | 
| 5 | * and writing it to a swap partition. | 5 | * and writing it to a swap partition. | 
| 6 | * | 6 | * | 
| 7 | * Copyright (C) 1998,2001-2005 Pavel Machek <pavel@suse.cz> | 7 | * Copyright (C) 1998,2001-2005 Pavel Machek <pavel@ucw.cz> | 
| 8 | * Copyright (C) 2006 Rafael J. Wysocki <rjw@sisk.pl> | 8 | * Copyright (C) 2006 Rafael J. Wysocki <rjw@sisk.pl> | 
| 9 | * | 9 | * | 
| 10 | * This file is released under the GPLv2. | 10 | * This file is released under the GPLv2. | 
| @@ -32,7 +32,7 @@ | |||
| 32 | /* | 32 | /* | 
| 33 | * The swap map is a data structure used for keeping track of each page | 33 | * The swap map is a data structure used for keeping track of each page | 
| 34 | * written to a swap partition. It consists of many swap_map_page | 34 | * written to a swap partition. It consists of many swap_map_page | 
| 35 | * structures that contain each an array of MAP_PAGE_SIZE swap entries. | 35 | * structures that contain each an array of MAP_PAGE_ENTRIES swap entries. | 
| 36 | * These structures are stored on the swap and linked together with the | 36 | * These structures are stored on the swap and linked together with the | 
| 37 | * help of the .next_swap member. | 37 | * help of the .next_swap member. | 
| 38 | * | 38 | * | 
| @@ -136,10 +136,10 @@ sector_t alloc_swapdev_block(int swap) | |||
| 136 | { | 136 | { | 
| 137 | unsigned long offset; | 137 | unsigned long offset; | 
| 138 | 138 | ||
| 139 | offset = swp_offset(get_swap_page_of_type(swap)); | 139 | offset = swp_offset(get_swap_for_hibernation(swap)); | 
| 140 | if (offset) { | 140 | if (offset) { | 
| 141 | if (swsusp_extents_insert(offset)) | 141 | if (swsusp_extents_insert(offset)) | 
| 142 | swap_free(swp_entry(swap, offset)); | 142 | swap_free_for_hibernation(swp_entry(swap, offset)); | 
| 143 | else | 143 | else | 
| 144 | return swapdev_block(swap, offset); | 144 | return swapdev_block(swap, offset); | 
| 145 | } | 145 | } | 
| @@ -148,7 +148,7 @@ sector_t alloc_swapdev_block(int swap) | |||
| 148 | 148 | ||
| 149 | /** | 149 | /** | 
| 150 | * free_all_swap_pages - free swap pages allocated for saving image data. | 150 | * free_all_swap_pages - free swap pages allocated for saving image data. | 
| 151 | * It also frees the extents used to register which swap entres had been | 151 | * It also frees the extents used to register which swap entries had been | 
| 152 | * allocated. | 152 | * allocated. | 
| 153 | */ | 153 | */ | 
| 154 | 154 | ||
| @@ -163,7 +163,7 @@ void free_all_swap_pages(int swap) | |||
| 163 | ext = container_of(node, struct swsusp_extent, node); | 163 | ext = container_of(node, struct swsusp_extent, node); | 
| 164 | rb_erase(node, &swsusp_extents); | 164 | rb_erase(node, &swsusp_extents); | 
| 165 | for (offset = ext->start; offset <= ext->end; offset++) | 165 | for (offset = ext->start; offset <= ext->end; offset++) | 
| 166 | swap_free(swp_entry(swap, offset)); | 166 | swap_free_for_hibernation(swp_entry(swap, offset)); | 
| 167 | 167 | ||
| 168 | kfree(ext); | 168 | kfree(ext); | 
| 169 | } | 169 | } | 
