diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2015-05-14 01:01:40 +0000 |
---|---|---|
committer | Johannes Weiner <hannes@cmpxchg.org> | 2015-05-14 01:01:40 +0000 |
commit | c914bafc590ce858b1d864eeddd179fa323c16f6 (patch) | |
tree | c7c1ce0ba00008b6b1e13ad391428097eec3cf48 | |
parent | 2117d32acb60a67f25e3121949f213f0b95a4839 (diff) | |
download | mm-next-c914bafc590ce858b1d864eeddd179fa323c16f6.tar.gz |
mm/memory-failure: me_huge_page() does nothing for thp
memory_failure() is supposed not to handle thp itself, but to split it.
But if something were wrong and page_action() were called on thp,
me_huge_page() (action routine for hugepages) should be better to take no
action, rather than to take wrong action prepared for hugetlb (which
triggers BUG_ON().)
This change is for potential problems, but makes sense to me because thp
is an actively developing feature and this code path can be open in the
future.
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | mm/memory-failure.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 0e9cd2ebf50926..c677a637e4bd90 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -744,6 +744,10 @@ static int me_huge_page(struct page *p, unsigned long pfn) { int res = 0; struct page *hpage = compound_head(p); + + if (!PageHuge(hpage)) + return MF_DELAYED; + /* * We can safely recover from error on free or reserved (i.e. * not in-use) hugepage by dequeuing it from freelist. |