]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mm, swap: remove redundant argument for isolating a cluster
authorKairui Song <kasong@tencent.com>
Thu, 23 Oct 2025 18:00:43 +0000 (02:00 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Nov 2025 01:28:20 +0000 (17:28 -0800)
The order argument was introduced by an intermediate commit and was then
never used, just remove it.

Link: https://lkml.kernel.org/r/20251024-swap-clean-after-swap-table-p1-v2-5-a709469052e7@tencent.com
Signed-off-by: Kairui Song <kasong@tencent.com>
Acked-by: Nhat Pham <nphamcs@gmail.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Chris Li <chrisl@kernel.org>
Cc: David Hildenbrand <david@redhat.com>
Cc: "Huang, Ying" <ying.huang@linux.alibaba.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c

index d87b562ae66107a33c312ba4cf6abdf5baac7863..125d893bb706abeb9da4d7dd71dbf9e5a4fb33ba 100644 (file)
@@ -594,7 +594,7 @@ static void __free_cluster(struct swap_info_struct *si, struct swap_cluster_info
  * this returns NULL for an non-empty list.
  */
 static struct swap_cluster_info *isolate_lock_cluster(
-               struct swap_info_struct *si, struct list_head *list, int order)
+               struct swap_info_struct *si, struct list_head *list)
 {
        struct swap_cluster_info *ci, *found = NULL;
 
@@ -957,7 +957,7 @@ static unsigned int alloc_swap_scan_list(struct swap_info_struct *si,
        unsigned int found = SWAP_ENTRY_INVALID;
 
        do {
-               struct swap_cluster_info *ci = isolate_lock_cluster(si, list, order);
+               struct swap_cluster_info *ci = isolate_lock_cluster(si, list);
                unsigned long offset;
 
                if (!ci)
@@ -982,7 +982,7 @@ static void swap_reclaim_full_clusters(struct swap_info_struct *si, bool force)
        if (force)
                to_scan = swap_usage_in_pages(si) / SWAPFILE_CLUSTER;
 
-       while ((ci = isolate_lock_cluster(si, &si->full_clusters, 0))) {
+       while ((ci = isolate_lock_cluster(si, &si->full_clusters))) {
                offset = cluster_offset(si, ci);
                end = min(si->max, offset + SWAPFILE_CLUSTER);
                to_scan--;