summaryrefslogtreecommitdiff
path: root/mm/memory-failure.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2023-07-11 13:50:11 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-08-18 10:12:19 -0700
commit80ee7cb271b52e5861eda3c67731c95fd55a2627 (patch)
tree1227b391f0e5bd7ce636b24e431a41143d6d388b /mm/memory-failure.c
parent92a025a790f82c278cc39b0997e9b3b6f3b69ee0 (diff)
mm: memory-failure: don't account hwpoison_filter() filtered pages
mf_generic_kill_procs() will return -EOPNOTSUPP when hwpoison_filter() filtered dax page. In that case, action_result() isn't expected to be called to update mf_stats. This will results in inaccurate but benign memory failure handling statistics. Link: https://lkml.kernel.org/r/20230711055016.2286677-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r--mm/memory-failure.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 71b4bb691c47..cac5413c5cc3 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -2098,7 +2098,8 @@ static int memory_failure_dev_pagemap(unsigned long pfn, int flags,
out:
/* drop pgmap ref acquired in caller */
put_dev_pagemap(pgmap);
- action_result(pfn, MF_MSG_DAX, rc ? MF_FAILED : MF_RECOVERED);
+ if (rc != -EOPNOTSUPP)
+ action_result(pfn, MF_MSG_DAX, rc ? MF_FAILED : MF_RECOVERED);
return rc;
}