]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: extend 'usage' parameter so that cluster_swap_free_nr() can be reused
authorBarry Song <v-songbaohua@oppo.com>
Wed, 24 Jul 2024 02:00:56 +0000 (14:00 +1200)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:52:25 +0000 (17:52 -0700)
commit956942c9c2b84eade6a0adbc5f1c00cee7df0ce4
tree306aa7e9cd306422f1dfbd85026156bf5eb23e2b
parent274c84f062ae207d112664cd18e969a1d3d3cc64
mm: extend 'usage' parameter so that cluster_swap_free_nr() can be reused

Extend a usage parameter so that cluster_swap_free_nr() can be reused by
both swapcache_clear() and swap_free().  __swap_entry_free() is quite
similar but more tricky as it requires the return value of
__swap_entry_free_locked() which cluster_swap_free_nr() doesn't support.

Link: https://lkml.kernel.org/r/20240724020056.65838-1-21cnbao@gmail.com
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Acked-by: Chris Li <chrisl@kernel.org>
Cc: "Huang, Ying" <ying.huang@intel.com>
Cc: Kairui Song <kasong@tencent.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Chuanhua Han <hanchuanhua@oppo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c