Messages in this thread | | | Subject | Re: [PATCH v9]: Improve performance of LZO/plain hibernation, check image with CRC32 | From | Bojan Smojver <> | Date | Mon, 10 Oct 2011 11:10:52 +1100 |
| |
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
| |