]> git.baikalelectronics.ru Git - kernel.git/commit
mm/madvise: minor cleanup for swapin_walk_pmd_entry()
authorMiaohe Lin <linmiaohe@huawei.com>
Sat, 18 Jun 2022 09:05:27 +0000 (17:05 +0800)
committerakpm <akpm@linux-foundation.org>
Mon, 4 Jul 2022 01:08:49 +0000 (18:08 -0700)
commit9b2c2d84018c02bb49877f976a0d284d75c9e8ae
tree52b064e4335bdd2d112c3c11a326f5c5c1a69577
parent490b246c39d3ea07426d866ff5a7563c21f19f09
mm/madvise: minor cleanup for swapin_walk_pmd_entry()

Passing index to pte_offset_map_lock() directly so the below calculation
can be avoided. Rename orig_pte to ptep as it's not changed. Also use
helper is_swap_pte() to improve the readability. No functional change
intended.

[akpm@linux-foundation.org: reduce scope of `ptep']
Link: https://lkml.kernel.org/r/20220618090527.37843-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/madvise.c