diff options
author | Minfei Huang <[email protected]> | 2015-09-09 15:38:58 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2015-09-10 13:29:01 -0700 |
commit | 04e9949b2d26ae1f0acd1181876a2a8ece92112d (patch) | |
tree | 67ca6ea9db1bfe72c8435b26dad08d88816b8a9e | |
parent | 2965faa5e03d1e71e9ff9aa143fff39e0a77543a (diff) |
kexec: remove unnecessary test in kimage_alloc_crash_control_pages()
Transforming PFN(Page Frame Number) to struct page is never failure, so we
can simplify the code logic to do the image->control_page assignment
directly in the loop, and remove the unnecessary conditional judgement.
Signed-off-by: Minfei Huang <[email protected]>
Acked-by: Dave Young <[email protected]>
Acked-by: Vivek Goyal <[email protected]>
Cc: Simon Horman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | kernel/kexec_core.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/kexec_core.c b/kernel/kexec_core.c index 9aa25c034b2e..9ffc96b65d9a 100644 --- a/kernel/kexec_core.c +++ b/kernel/kexec_core.c @@ -439,11 +439,10 @@ static struct page *kimage_alloc_crash_control_pages(struct kimage *image, /* If I don't overlap any segments I have found my hole! */ if (i == image->nr_segments) { pages = pfn_to_page(hole_start >> PAGE_SHIFT); + image->control_page = hole_end; break; } } - if (pages) - image->control_page = hole_end; return pages; } |