mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
mm/hwpoison-inject: check PageLRU of hpage
Hwpoison injector checks PageLRU of the raw target page to find out whether the page is an appropriate target, but current code now filters out thp tail pages, which prevents us from testing for such cases via this interface. So let's check hpage instead of p. Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Dean Nelson <dnelson@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7ea434a4eb
commit
e386eed89c
1 changed files with 3 additions and 3 deletions
|
@ -34,12 +34,12 @@ static int hwpoison_inject(void *data, u64 val)
|
|||
if (!hwpoison_filter_enable)
|
||||
goto inject;
|
||||
|
||||
if (!PageLRU(p) && !PageHuge(p))
|
||||
shake_page(p, 0);
|
||||
if (!PageLRU(hpage) && !PageHuge(p))
|
||||
shake_page(hpage, 0);
|
||||
/*
|
||||
* This implies unable to support non-LRU pages.
|
||||
*/
|
||||
if (!PageLRU(p) && !PageHuge(p))
|
||||
if (!PageLRU(hpage) && !PageHuge(p))
|
||||
goto put_out;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue