diff options
Diffstat (limited to 'kernel/mm/migrate.c')
-rw-r--r-- | kernel/mm/migrate.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/mm/migrate.c b/kernel/mm/migrate.c index 6d17e0ab4..72c09dea6 100644 --- a/kernel/mm/migrate.c +++ b/kernel/mm/migrate.c @@ -429,6 +429,7 @@ int migrate_page_move_mapping(struct address_space *mapping, return MIGRATEPAGE_SUCCESS; } +EXPORT_SYMBOL(migrate_page_move_mapping); /* * The expected number of remaining references is the same as that @@ -579,6 +580,7 @@ void migrate_page_copy(struct page *newpage, struct page *page) if (PageWriteback(newpage)) end_page_writeback(newpage); } +EXPORT_SYMBOL(migrate_page_copy); /************************************************************ * Migration functions @@ -963,7 +965,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(); |