]> Git Repo - linux.git/commitdiff
mm: mincore: add hwpoison page handle
authorWeijie Yang <[email protected]>
Sat, 13 Dec 2014 00:55:07 +0000 (16:55 -0800)
committerLinus Torvalds <[email protected]>
Sat, 13 Dec 2014 20:42:46 +0000 (12:42 -0800)
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.

[[email protected]: coding-style fixes]
Signed-off-by: Weijie Yang <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: Rik van Riel <[email protected]>
Acked-by: Naoya Horiguchi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/mincore.c

index 725c809610483c6822d3ffa158820d3ff64da1a6..c8c528b3664195a5373dbe5d1608e7b958a59f75 100644 (file)
@@ -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
This page took 0.048074 seconds and 4 git commands to generate.