Re: [PATCH v9]: Improve performance of LZO/plain hibernation, checkimage with CRC32
From: Bojan Smojver
Date: Sun Oct 09 2011 - 20:11:45 EST
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/