Message ID | 32aa0d9b94c4f5ee92cb07cc95dcf21a61b41ad8.camel@kylinos.cn |
---|---|
State | New |
Headers | show |
Series | [v2] hibernate: pageoffline may be first judged | expand |
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index c9fb559a6399..dfbccddb28f1 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c @@ -1328,10 +1328,10 @@ static struct page *saveable_highmem_page(struct zone *zone, unsigned long pfn) BUG_ON(!PageHighMem(page)); - if (swsusp_page_is_forbidden(page) || swsusp_page_is_free(page)) + if (PageReserved(page) || PageOffline(page)) return NULL; - if (PageReserved(page) || PageOffline(page)) + if (swsusp_page_is_forbidden(page) || swsusp_page_is_free(page)) return NULL;