diff options
-rw-r--r-- | mm/memory-failure.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index ece5d481b5ff..1ddb25a1073e 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -363,17 +363,14 @@ void shake_page(struct page *p) { if (PageHuge(p)) return; - - if (!PageSlab(p)) { - lru_add_drain_all(); - if (PageLRU(p) || is_free_buddy_page(p)) - return; - } - /* * TODO: Could shrink slab caches here if a lightweight range-based * shrinker will be available. */ + if (PageSlab(p)) + return; + + lru_add_drain_all(); } EXPORT_SYMBOL_GPL(shake_page); |