diff options
author | Baoquan He <bhe@redhat.com> | 2020-10-14 02:56:14 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-10-14 04:38:33 +0300 |
commit | d79d176a303775e2ccb16ca3c08bb63c030aa4dc (patch) | |
tree | 30a3184d00d8d59436aaeefbfe8042479d9fd583 /Documentation/admin-guide/mm | |
parent | 3e5c36007e9c37378ff0bcaa2bc813d72c8659bc (diff) | |
download | linux-d79d176a303775e2ccb16ca3c08bb63c030aa4dc.tar.xz |
mm/hugetlb.c: remove the unnecessary non_swap_entry()
If a swap entry tests positive for either is_[migration|hwpoison]_entry(),
then its swap_type() is among SWP_MIGRATION_READ, SWP_MIGRATION_WRITE and
SWP_HWPOISON. All these types >= MAX_SWAPFILES, exactly what is asserted
with non_swap_entry().
So the checking non_swap_entry() in is_hugetlb_entry_migration() and
is_hugetlb_entry_hwpoisoned() is redundant.
Let's remove it to optimize code.
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-3-bhe@redhat.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/admin-guide/mm')
0 files changed, 0 insertions, 0 deletions