projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab00db2
)
mm/hugetlb.c: make is_hugetlb_entry_hwpoisoned return bool
author
Baoquan He
<bhe@redhat.com>
Tue, 13 Oct 2020 23:56:10 +0000
(16:56 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Wed, 14 Oct 2020 01:38:33 +0000
(18:38 -0700)
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 <bhe@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link:
https://lkml.kernel.org/r/20200723032248.24772-1-bhe@redhat.com
Link:
https://lkml.kernel.org/r/20200723032248.24772-2-bhe@redhat.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c
patch
|
blob
|
history
diff --git
a/mm/hugetlb.c
b/mm/hugetlb.c
index
67fc638
..
57b96c1
100644
(file)
--- 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,