• Huang Ying's avatar
    mm,swap: remove struct vma_swap_readahead · dce08dd2
    Huang Ying authored
    When VMA based swap readahead is introduced in commit ec560175 ("mm,
    swap: VMA based swap readahead"), "struct vma_swap_readahead" is defined
    to describe the readahead window.  Because we wanted to save the PTE
    entries in the struct at that time.  But after commit 4f8fcf4c
    ("mm/swap: swap_vma_readahead() do the pte_offset_map()"), we no longer
    save PTE entries in the struct.  The size of the struct becomes so small,
    that it's better to use the fields of the struct directly.  This can
    simplify the code to improve the code readability.  The line number of
    source code reduces too.
    
    No functionality change is expected in this patch.
    
    Link: https://lkml.kernel.org/r/20240531081230.310128-3-ying.huang@intel.comSigned-off-by: default avatar"Huang, Ying" <ying.huang@intel.com>
    Cc: Hugh Dickins <hughd@google.com>
    Cc: Alistair Popple <apopple@nvidia.com>
    Cc: Anshuman Khandual <anshuman.khandual@arm.com>
    Cc: David Hildenbrand <david@redhat.com>
    Cc: Mel Gorman <mgorman@techsingularity.net>
    Cc: Miaohe Lin <linmiaohe@huawei.com>
    Cc: Minchan Kim <minchan@kernel.org>
    Cc: Ryan Roberts <ryan.roberts@arm.com>
    Cc: Yang Shi <shy828301@gmail.com>
    Cc: Yu Zhao <yuzhao@google.com>
    Cc: Kairui Song <kasong@tencent.com>
    Cc: Barry Song <v-songbaohua@oppo.com>
    Cc: Chris Li <chrisl@kernel.org>
    Cc: Yosry Ahmed <yosryahmed@google.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    dce08dd2
swap_state.c 25.8 KB