lkml.org 
[lkml]   [2011]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9]: Improve performance of LZO/plain hibernation, check image with CRC32
From
Date
On Mon, 2011-10-10 at 10:53 +1100, Bojan Smojver wrote:
> static void release_swap_reader(struct swap_map_handle *handle)
> {
> - if (handle->cur)
> - free_page((unsigned long)handle->cur);
> + struct swap_map_page_list *tmp;
> +
> + while (handle->maps) {
> + if (handle->maps->map)
> + free_page((unsigned long)handle->maps->map);
> + tmp = handle->maps;
> + handle->maps = handle->maps->next;
> + kfree(tmp);
> + }
> handle->cur = NULL;
> + handle->maps = NULL;
> }

Obviously, that handle->maps = NULL is redundant there.

PS. It's funny how errors only become visible once you send them
out. :-)

--
Bojan



\
 
 \ /
  Last update: 2011-10-10 02:13    [W:0.020 / U:3.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site