summaryrefslogtreecommitdiff
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-05-12 09:27:18 +0800
committerAlex Shi <alex.shi@linaro.org>2016-05-12 09:27:18 +0800
commit334ca3ed18ded942e0220719f70b80eb20fa48ec (patch)
tree16e6d4a8342db2ff94505cb0dba60cd2fa1587bf /mm/migrate.c
parentbab15641824ad77e5f3af9cc4b84308cba32aa7d (diff)
parent9ba733e2628196c5f211875122c8fc6de108c19e (diff)
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 6d17e0ab42d4..bbeb0b71fcf4 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -963,7 +963,13 @@ out:
dec_zone_page_state(page, NR_ISOLATED_ANON +
page_is_file_cache(page));
/* Soft-offlined page shouldn't go through lru cache list */
- if (reason == MR_MEMORY_FAILURE) {
+ if (reason == MR_MEMORY_FAILURE && rc == MIGRATEPAGE_SUCCESS) {
+ /*
+ * With this release, we free successfully migrated
+ * page and set PG_HWPoison on just freed page
+ * intentionally. Although it's rather weird, it's how
+ * HWPoison flag works at the moment.
+ */
put_page(page);
if (!test_set_page_hwpoison(page))
num_poisoned_pages_inc();