From: Weijie Yang Date: Sat, 13 Dec 2014 00:55:07 +0000 (-0800) Subject: mm: mincore: add hwpoison page handle X-Git-Tag: v5.15~16696^2~79 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c313dc5dedbc9b51bb7a77959ffbda44712ac2e1;p=platform%2Fkernel%2Flinux-starfive.git mm: mincore: add hwpoison page handle When the encountered pte is a swap entry, the current code handles two cases: migration and normal swapentry, but we have a third case: hwpoison page. This patch adds hwpoison page handle, consider hwpoison page incore as same as migration. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Weijie Yang Acked-by: Johannes Weiner Cc: Mel Gorman Cc: Hugh Dickins Cc: Rik van Riel Acked-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/mincore.c b/mm/mincore.c index 725c809..c8c528b 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -137,8 +137,11 @@ static void mincore_pte_range(struct vm_area_struct *vma, pmd_t *pmd, } else { /* pte is a swap entry */ swp_entry_t entry = pte_to_swp_entry(pte); - if (is_migration_entry(entry)) { - /* migration entries are always uptodate */ + if (non_swap_entry(entry)) { + /* + * migration or hwpoison entries are always + * uptodate + */ *vec = 1; } else { #ifdef CONFIG_SWAP