summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/memory-failure.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 2d5f122..ded1d38 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -936,8 +936,15 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)
* walked by the page reclaim code, however that's not a big loss.
*/
if (!PageLRU(p))
- lru_add_drain_all();
+ shake_page(p);
if (!PageLRU(p)) {
+ /*
+ * shake_page could have turned it free.
+ */
+ if (is_free_buddy_page(p)) {
+ action_result(pfn, "free buddy, 2nd try", DELAYED);
+ return 0;
+ }
action_result(pfn, "non LRU", IGNORED);
put_page(p);
return -EBUSY;
OpenPOWER on IntegriCloud