summaryrefslogtreecommitdiffstats
path: root/mm/memory-failure.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-05-18 08:23:37 +0200
committerTakashi Iwai <tiwai@suse.de>2015-05-18 08:23:37 +0200
commit5a6cc82171dba297ceab49cda47f2bf5616f87b3 (patch)
tree1e12036476a4faf4b404a0a4e070d148efafc221 /mm/memory-failure.c
parent09ea997677cd44ebe7f42573119aaf46b775c683 (diff)
parent7730c0b55043f6ff1c27e9cb45e13679995b2361 (diff)
downloadblackbird-op-linux-5a6cc82171dba297ceab49cda47f2bf5616f87b3.tar.gz
blackbird-op-linux-5a6cc82171dba297ceab49cda47f2bf5616f87b3.zip
Merge tag 'asoc-fix-v4.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v4.1 A few more fixes for v4.1, some driver fixes plus one core fix which fixes registration of DAI links when adding prefixes to CODECs to deuplicate in multi-CODEC systems.
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r--mm/memory-failure.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index d9359b770cd9..501820c815b3 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1187,10 +1187,10 @@ int memory_failure(unsigned long pfn, int trapno, int flags)
* The check (unnecessarily) ignores LRU pages being isolated and
* walked by the page reclaim code, however that's not a big loss.
*/
- if (!PageHuge(p) && !PageTransTail(p)) {
- if (!PageLRU(p))
- shake_page(p, 0);
- if (!PageLRU(p)) {
+ if (!PageHuge(p)) {
+ if (!PageLRU(hpage))
+ shake_page(hpage, 0);
+ if (!PageLRU(hpage)) {
/*
* shake_page could have turned it free.
*/
@@ -1777,12 +1777,12 @@ int soft_offline_page(struct page *page, int flags)
} else if (ret == 0) { /* for free pages */
if (PageHuge(page)) {
set_page_hwpoison_huge_page(hpage);
- dequeue_hwpoisoned_huge_page(hpage);
- atomic_long_add(1 << compound_order(hpage),
+ if (!dequeue_hwpoisoned_huge_page(hpage))
+ atomic_long_add(1 << compound_order(hpage),
&num_poisoned_pages);
} else {
- SetPageHWPoison(page);
- atomic_long_inc(&num_poisoned_pages);
+ if (!TestSetPageHWPoison(page))
+ atomic_long_inc(&num_poisoned_pages);
}
}
unset_migratetype_isolate(page, MIGRATE_MOVABLE);
OpenPOWER on IntegriCloud