提交 138ce286 编写于 作者: W Wu Fengguang 提交者: Andi Kleen

HWPOISON: return 0 to indicate success reliably

Return 0 to indicate success, when
- action result is RECOVERED or DELAYED
- no extra page reference

Note that dirty swapcache pages are kept in swapcache, so can have one
more reference count.
Signed-off-by: NWu Fengguang <fengguang.wu@intel.com>
Signed-off-by: NAndi Kleen <ak@linux.intel.com>
上级 d95ea51e
......@@ -654,17 +654,21 @@ static int page_action(struct page_state *ps, struct page *p,
action_result(pfn, ps->msg, result);
count = page_count(p) - 1;
if (count != 0)
if (ps->action == me_swapcache_dirty && result == DELAYED)
count--;
if (count != 0) {
printk(KERN_ERR
"MCE %#lx: %s page still referenced by %d users\n",
pfn, ps->msg, count);
result = FAILED;
}
/* Could do more checks here if page looks ok */
/*
* Could adjust zone counters here to correct for the missing page.
*/
return result == RECOVERED ? 0 : -EBUSY;
return (result == RECOVERED || result == DELAYED) ? 0 : -EBUSY;
}
#define N_UNMAP_TRIES 5
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册