lkml.org 
[lkml]   [2014]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm: mincore: add hwpoison page handle
Date
When encounter 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.

Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
---
mm/mincore.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/mincore.c b/mm/mincore.c
index 725c809..3545f13 100644
--- a/mm/mincore.c
+++ b/mm/mincore.c
@@ -137,8 +137,8 @@ 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
--
1.7.0.4



\
 
 \ /
  Last update: 2014-11-12 05:41    [W:0.038 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site