Commit 47e431f4 authored by Oscar Salvador's avatar Oscar Salvador Committed by Linus Torvalds

mm,hwpoison: remove drain_all_pages from shake_page

get_hwpoison_page already drains pcplists, previously disabling them when
trying to grab a refcount.  We do not need shake_page to take care of it
anymore.

Link: https://lkml.kernel.org/r/20201204102558.31607-4-osalvador@suse.deSigned-off-by: default avatarOscar Salvador <osalvador@suse.de>
Acked-by: default avatarNaoya Horiguchi <naoya.horiguchi@nec.com>
Cc: Qian Cai <qcai@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2f714160
...@@ -263,8 +263,8 @@ static int kill_proc(struct to_kill *tk, unsigned long pfn, int flags) ...@@ -263,8 +263,8 @@ static int kill_proc(struct to_kill *tk, unsigned long pfn, int flags)
} }
/* /*
* When a unknown page type is encountered drain as many buffers as possible * Unknown page type encountered. Try to check whether it can turn PageLRU by
* in the hope to turn the page into a LRU or free page, which we can handle. * lru_add_drain_all, or a free page by reclaiming slabs when possible.
*/ */
void shake_page(struct page *p, int access) void shake_page(struct page *p, int access)
{ {
...@@ -273,9 +273,6 @@ void shake_page(struct page *p, int access) ...@@ -273,9 +273,6 @@ void shake_page(struct page *p, int access)
if (!PageSlab(p)) { if (!PageSlab(p)) {
lru_add_drain_all(); lru_add_drain_all();
if (PageLRU(p))
return;
drain_all_pages(page_zone(p));
if (PageLRU(p) || is_free_buddy_page(p)) if (PageLRU(p) || is_free_buddy_page(p))
return; return;
} }
......
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