diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory-failure.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index ceb0c7f1932f..6a7f9cab4ddb 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -936,6 +936,16 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, | |||
936 | BUG_ON(!PageHWPoison(p)); | 936 | BUG_ON(!PageHWPoison(p)); |
937 | return SWAP_FAIL; | 937 | return SWAP_FAIL; |
938 | } | 938 | } |
939 | /* | ||
940 | * We pinned the head page for hwpoison handling, | ||
941 | * now we split the thp and we are interested in | ||
942 | * the hwpoisoned raw page, so move the refcount | ||
943 | * to it. | ||
944 | */ | ||
945 | if (hpage != p) { | ||
946 | put_page(hpage); | ||
947 | get_page(p); | ||
948 | } | ||
939 | /* THP is split, so ppage should be the real poisoned page. */ | 949 | /* THP is split, so ppage should be the real poisoned page. */ |
940 | ppage = p; | 950 | ppage = p; |
941 | } | 951 | } |