diff options
-rw-r--r-- | mm/memory-failure.c | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 04158d6f44d4..0207c2f6f8bd 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -233,8 +233,8 @@ void shake_page(struct page *p, int access) | |||
233 | } | 233 | } |
234 | 234 | ||
235 | /* | 235 | /* |
236 | * Only all shrink_slab here (which would also | 236 | * Only call shrink_slab here (which would also shrink other caches) if |
237 | * shrink other caches) if access is not potentially fatal. | 237 | * access is not potentially fatal. |
238 | */ | 238 | */ |
239 | if (access) { | 239 | if (access) { |
240 | int nr; | 240 | int nr; |
@@ -1065,19 +1065,22 @@ int __memory_failure(unsigned long pfn, int trapno, int flags) | |||
1065 | * The check (unnecessarily) ignores LRU pages being isolated and | 1065 | * The check (unnecessarily) ignores LRU pages being isolated and |
1066 | * walked by the page reclaim code, however that's not a big loss. | 1066 | * walked by the page reclaim code, however that's not a big loss. |
1067 | */ | 1067 | */ |
1068 | if (!PageLRU(p) && !PageHuge(p)) | 1068 | if (!PageHuge(p) && !PageTransCompound(p)) { |
1069 | shake_page(p, 0); | 1069 | if (!PageLRU(p)) |
1070 | if (!PageLRU(p) && !PageHuge(p)) { | 1070 | shake_page(p, 0); |
1071 | /* | 1071 | if (!PageLRU(p)) { |
1072 | * shake_page could have turned it free. | 1072 | /* |
1073 | */ | 1073 | * shake_page could have turned it free. |
1074 | if (is_free_buddy_page(p)) { | 1074 | */ |
1075 | action_result(pfn, "free buddy, 2nd try", DELAYED); | 1075 | if (is_free_buddy_page(p)) { |
1076 | return 0; | 1076 | action_result(pfn, "free buddy, 2nd try", |
1077 | DELAYED); | ||
1078 | return 0; | ||
1079 | } | ||
1080 | action_result(pfn, "non LRU", IGNORED); | ||
1081 | put_page(p); | ||
1082 | return -EBUSY; | ||
1077 | } | 1083 | } |
1078 | action_result(pfn, "non LRU", IGNORED); | ||
1079 | put_page(p); | ||
1080 | return -EBUSY; | ||
1081 | } | 1084 | } |
1082 | 1085 | ||
1083 | /* | 1086 | /* |