提交 3f871370 编写于 作者: M Miaohe Lin 提交者: akpm

mm/memory-failure.c: minor cleanup for HWPoisonHandlable

Patch series "A few fixup and cleanup patches for memory failure", v2.

This series contains a patch to clean up the HWPoisonHandlable and another
one to dissolve truncated hugetlb page.  More details can be found in the
respective changelogs.


This patch (of 2):

The local variable movable can be removed by returning true directly. Also
fix typo 'mirgate'. No functional change intended.

Link: https://lkml.kernel.org/r/20220414114941.11223-1-linmiaohe@huawei.com
Link: https://lkml.kernel.org/r/20220414114941.11223-2-linmiaohe@huawei.comSigned-off-by: NMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: NDavid Hildenbrand <david@redhat.com>
Reviewed-by: NYang Shi <shy828301@gmail.com>
Acked-by: NNaoya Horiguchi <naoya.horiguchi@nec.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
上级 2ba2b008
...@@ -1178,13 +1178,11 @@ void ClearPageHWPoisonTakenOff(struct page *page) ...@@ -1178,13 +1178,11 @@ void ClearPageHWPoisonTakenOff(struct page *page)
*/ */
static inline bool HWPoisonHandlable(struct page *page, unsigned long flags) static inline bool HWPoisonHandlable(struct page *page, unsigned long flags)
{ {
bool movable = false; /* Soft offline could migrate non-LRU movable pages */
/* Soft offline could mirgate non-LRU movable pages */
if ((flags & MF_SOFT_OFFLINE) && __PageMovable(page)) if ((flags & MF_SOFT_OFFLINE) && __PageMovable(page))
movable = true; return true;
return movable || PageLRU(page) || is_free_buddy_page(page); return PageLRU(page) || is_free_buddy_page(page);
} }
static int __get_hwpoison_page(struct page *page, unsigned long flags) static int __get_hwpoison_page(struct page *page, unsigned long flags)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册