diff options
author | Weijie Yang <weijie.yang@samsung.com> | 2014-12-12 19:55:07 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-13 15:42:46 -0500 |
commit | c313dc5dedbc9b51bb7a77959ffbda44712ac2e1 (patch) | |
tree | 031d187587ccc0b527730cc371f5601581009aff /mm/mincore.c | |
parent | b258d860652934b5e014408302335430b81bd7ce (diff) |
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 <weijie.yang@samsung.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@suse.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mincore.c')
-rw-r--r-- | mm/mincore.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/mincore.c b/mm/mincore.c index 725c80961048..c8c528b36641 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, | |||
137 | } else { /* pte is a swap entry */ | 137 | } else { /* pte is a swap entry */ |
138 | swp_entry_t entry = pte_to_swp_entry(pte); | 138 | swp_entry_t entry = pte_to_swp_entry(pte); |
139 | 139 | ||
140 | if (is_migration_entry(entry)) { | 140 | if (non_swap_entry(entry)) { |
141 | /* migration entries are always uptodate */ | 141 | /* |
142 | * migration or hwpoison entries are always | ||
143 | * uptodate | ||
144 | */ | ||
142 | *vec = 1; | 145 | *vec = 1; |
143 | } else { | 146 | } else { |
144 | #ifdef CONFIG_SWAP | 147 | #ifdef CONFIG_SWAP |