|
@@ -233,8 +233,8 @@ void shake_page(struct page *p, int access)
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
- * Only all shrink_slab here (which would also
|
|
|
|
- * shrink other caches) if access is not potentially fatal.
|
|
|
|
|
|
+ * Only call shrink_slab here (which would also shrink other caches) if
|
|
|
|
+ * access is not potentially fatal.
|
|
*/
|
|
*/
|
|
if (access) {
|
|
if (access) {
|
|
int nr;
|
|
int nr;
|
|
@@ -1065,19 +1065,22 @@ int __memory_failure(unsigned long pfn, int trapno, int flags)
|
|
* The check (unnecessarily) ignores LRU pages being isolated and
|
|
* The check (unnecessarily) ignores LRU pages being isolated and
|
|
* walked by the page reclaim code, however that's not a big loss.
|
|
* walked by the page reclaim code, however that's not a big loss.
|
|
*/
|
|
*/
|
|
- if (!PageLRU(p) && !PageHuge(p))
|
|
|
|
- shake_page(p, 0);
|
|
|
|
- if (!PageLRU(p) && !PageHuge(p)) {
|
|
|
|
- /*
|
|
|
|
- * shake_page could have turned it free.
|
|
|
|
- */
|
|
|
|
- if (is_free_buddy_page(p)) {
|
|
|
|
- action_result(pfn, "free buddy, 2nd try", DELAYED);
|
|
|
|
- return 0;
|
|
|
|
|
|
+ if (!PageHuge(p) && !PageTransCompound(p)) {
|
|
|
|
+ if (!PageLRU(p))
|
|
|
|
+ shake_page(p, 0);
|
|
|
|
+ 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;
|
|
}
|
|
}
|
|
- action_result(pfn, "non LRU", IGNORED);
|
|
|
|
- put_page(p);
|
|
|
|
- return -EBUSY;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|