mm/hwpoison-inject: check PageLRU of hpage
authorNaoya Horiguchi <[email protected]>
Tue, 5 May 2015 23:23:52 +0000 (16:23 -0700)
committerLinus Torvalds <[email protected]>
Wed, 6 May 2015 00:10:11 +0000 (17:10 -0700)
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 <[email protected]>
Acked-by: Dean Nelson <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Hidetoshi Seto <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/hwpoison-inject.c

index 2b3f933e3282aa68591b6fc48477b4701e7bb895..4ca5fe0042e17c2eac0dd6d16f0065c41a5dfd4e 100644 (file)
@@ -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;
 
        /*