diff options
author | Miaohe Lin <[email protected]> | 2022-04-28 23:16:02 -0700 |
---|---|---|
committer | akpm <[email protected]> | 2022-04-28 23:16:02 -0700 |
commit | 3f871370686ddf3c72207321eef8f6672ae957e4 (patch) | |
tree | adef1e45a225cc0a5d36edf42bd22c0ef6a19fe9 | |
parent | 2ba2b008a8bf5fd268a43d03ba79e0ad464d6836 (diff) |
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/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Yang Shi <[email protected]>
Acked-by: Naoya Horiguchi <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r-- | mm/memory-failure.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 8af37f76e7ba..48815e1af645 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1178,13 +1178,11 @@ void ClearPageHWPoisonTakenOff(struct page *page) */ static inline bool HWPoisonHandlable(struct page *page, unsigned long flags) { - bool movable = false; - - /* Soft offline could mirgate non-LRU movable pages */ + /* Soft offline could migrate non-LRU movable pages */ 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) |