diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-24 10:10:47 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-24 10:10:47 -0800 |
| commit | b86b75ec57c381f32090a5bc61252f84f955c094 (patch) | |
| tree | 69afa8a88979bfa8fbdbcb106ddf8fe3ee5da99f /mm/memory-failure.c | |
| parent | 351d6204bfc814a1aee300296d2f54460ffff172 (diff) | |
| parent | 413541dd66d51f791a0b169d9b9014e4f56be13c (diff) | |
Merge 3.13-rc5 into tty-next
We need the tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/memory-failure.c')
| -rw-r--r-- | mm/memory-failure.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index b7c171602ba1..db08af92c6fc 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1505,10 +1505,16 @@ static int soft_offline_huge_page(struct page *page, int flags) if (ret > 0) ret = -EIO; } else { - set_page_hwpoison_huge_page(hpage); - dequeue_hwpoisoned_huge_page(hpage); - atomic_long_add(1 << compound_order(hpage), - &num_poisoned_pages); + /* overcommit hugetlb page will be freed to buddy */ + if (PageHuge(page)) { + set_page_hwpoison_huge_page(hpage); + dequeue_hwpoisoned_huge_page(hpage); + atomic_long_add(1 << compound_order(hpage), + &num_poisoned_pages); + } else { + SetPageHWPoison(page); + atomic_long_inc(&num_poisoned_pages); + } } return ret; } |
