]> www.infradead.org Git - users/jedix/linux-maple.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)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:15:10 +0000 (20:15 -0400)
commitb58a1eed16bf72976d8d5f2b29768398a7bd30cd
tree7260adc68908511ea53157e5e91711e21f9ed6f1
parent542ffb9c45236332732e584c4e31e21b82940d2c
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.

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