Commit 2b24692b authored by Geliang Tang's avatar Geliang Tang Committed by Linus Torvalds

kernel/kexec_core.c: use list_for_each_entry_safe in kimage_free_page_list

Use list_for_each_entry_safe() instead of list_for_each_safe() to
simplify the code.
Signed-off-by: default avatarGeliang Tang <>
Cc: Dave Young <>
Cc: Vivek Goyal <>
Acked-by: default avatarBaoquan He <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent cdf4b3fa
......@@ -310,12 +310,9 @@ static void kimage_free_pages(struct page *page)
void kimage_free_page_list(struct list_head *list)
struct list_head *pos, *next;
struct page *page, *next;
list_for_each_safe(pos, next, list) {
struct page *page;
page = list_entry(pos, struct page, lru);
list_for_each_entry_safe(page, next, list, lru) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment