summaryrefslogtreecommitdiff
path: root/mm/memory-failure.c
diff options
context:
space:
mode:
authorWu Fengguang <fengguang.wu@intel.com>2009-12-16 12:19:58 +0100
committerAndi Kleen <ak@linux.intel.com>2009-12-16 12:19:58 +0100
commit138ce286eb6ee6d39ca4fb50516e93adaf6b605f (patch)
treea3dc707a8daa6d28e1b1b0d8315dcc5c5339ed59 /mm/memory-failure.c
parentd95ea51e3a7e9ee051d19f1dd283ca61d1aa5ec6 (diff)
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: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r--mm/memory-failure.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index fd1ac1537f06..edeaf2319e74 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -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