aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaoquan He <[email protected]>2020-10-13 16:56:10 -0700
committerLinus Torvalds <[email protected]>2020-10-13 18:38:33 -0700
commit3e5c36007e9c37378ff0bcaa2bc813d72c8659bc (patch)
treed920dae7a28917ed8d3b2bfa2ca70800a0065640
parentab00db216c9c78cc0a68bc4e27889c1ee374598d (diff)
mm/hugetlb.c: make is_hugetlb_entry_hwpoisoned return bool
Patch series "mm/hugetlb: Small cleanup and improvement", v2. This patch (of 3): Just like its neighbour is_hugetlb_entry_migration() has done. Signed-off-by: Baoquan He <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Mike Kravetz <[email protected]> Reviewed-by: David Hildenbrand <[email protected]> Reviewed-by: Anshuman Khandual <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/hugetlb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 67fc6383995b..57b96c1d5265 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3805,17 +3805,17 @@ bool is_hugetlb_entry_migration(pte_t pte)
return false;
}
-static int is_hugetlb_entry_hwpoisoned(pte_t pte)
+static bool is_hugetlb_entry_hwpoisoned(pte_t pte)
{
swp_entry_t swp;
if (huge_pte_none(pte) || pte_present(pte))
- return 0;
+ return false;
swp = pte_to_swp_entry(pte);
if (non_swap_entry(swp) && is_hwpoison_entry(swp))
- return 1;
+ return true;
else
- return 0;
+ return false;
}
int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,