summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/madvise.c5
-rw-r--r--mm/memory-failure.c4
2 files changed, 2 insertions, 7 deletions
diff --git a/mm/madvise.c b/mm/madvise.c
index 0039bfe4ca9f..68b761c359d0 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -896,11 +896,6 @@ static int madvise_inject_error(int behavior,
*/
size = page_size(compound_head(page));
- if (PageHWPoison(page)) {
- put_page(page);
- continue;
- }
-
if (behavior == MADV_SOFT_OFFLINE) {
pr_info("Soft offlining pfn %#lx at process virtual address %#lx\n",
pfn, start);
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 93b32d4534e3..1fb290faf28e 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1802,7 +1802,7 @@ static int __soft_offline_page(struct page *page)
unlock_page(page);
put_page(page);
pr_info("soft offline: %#lx page already poisoned\n", pfn);
- return -EBUSY;
+ return 0;
}
if (!PageHuge(page))
@@ -1906,7 +1906,7 @@ int soft_offline_page(unsigned long pfn, int flags)
pr_info("soft offline: %#lx page already poisoned\n", pfn);
if (flags & MF_COUNT_INCREASED)
put_page(page);
- return -EBUSY;
+ return 0;
}
get_online_mems();