X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=mm%2Fmigrate.c;h=f9dfb18a4ebac9f2f36d798ce6fa6b4ecd4d3c77;hb=d4bf7078c43e11097e0d6f04d3fb999bf92c4fb0;hp=6c822a7b27e066148d38fd9ed47f80a3ad4de055;hpb=a34d5df85ebb8317592360b1611354f8b9853e55;p=deliverable%2Flinux.git diff --git a/mm/migrate.c b/mm/migrate.c index 6c822a7b27e0..f9dfb18a4eba 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -975,7 +975,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();