]> git.baikalelectronics.ru Git - kernel.git/commit
khugepaged: remove meaningless !pte_present() check in khugepaged_scan_pmd()
authorMiaohe Lin <linmiaohe@huawei.com>
Wed, 5 May 2021 01:34:20 +0000 (18:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 5 May 2021 18:27:21 +0000 (11:27 -0700)
commit9fa588fa550effc4b6a3a5f67d31b75cb225be64
tree42700400686ceb7594ba669a454e79e5d521382e
parent95c963d94863ea9ca8a941355ed31f0d4e8b928f
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/20210325135647.64106-4-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/khugepaged.c