diff options
author | Miaohe Lin <[email protected]> | 2021-05-04 18:34:20 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-05-05 11:27:21 -0700 |
commit | 75f83783bfdf2ddb3ffbf79ba44d506fb5b5548f (patch) | |
tree | 42700400686ceb7594ba669a454e79e5d521382e | |
parent | 18d24a7cd9d3f35cfa8bed32a921a94159c78df0 (diff) |
khugepaged: remove meaningless !pte_present() check in khugepaged_scan_pmd()
We know it must meet the !is_swap_pte() and !pte_none() condition if we
reach here. Since !is_swap_pte() indicates pte_none() or pte_present()
is met, it's guaranteed that pte must be present here.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Reviewed-by: Zi Yan <[email protected]>
Cc: Mike Kravetz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/khugepaged.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 276ac0099e19..a03569eda183 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1271,10 +1271,6 @@ static int khugepaged_scan_pmd(struct mm_struct *mm, goto out_unmap; } } - if (!pte_present(pteval)) { - result = SCAN_PTE_NON_PRESENT; - goto out_unmap; - } if (pte_uffd_wp(pteval)) { /* * Don't collapse the page if any of the small |