]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-swap-do-not-choose-swap-device-according-to-numa-node-fix
authorAndrew Morton <akpm@linux-foundation.org>
Sat, 11 Oct 2025 21:57:29 +0000 (14:57 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 15 Oct 2025 04:28:51 +0000 (21:28 -0700)
fix build issues

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202510120456.vTSygUXV-lkp@intel.com/
Cc: Aaron Lu <aaron.lu@intel.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Chris Li <chrisl@kernel.org>
Cc: Kairui Song <kasong@tencent.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swapfile.c

index 4a36ea15de2b7c66dce0c2a0946a49280a7d22e2..a6a510e050afa50c319986d2d76806b98cb482be 100644 (file)
@@ -1388,11 +1388,10 @@ start_over:
 static bool swap_sync_discard(void)
 {
        bool ret = false;
-       int nid = numa_node_id();
        struct swap_info_struct *si, *next;
 
        spin_lock(&swap_avail_lock);
-       plist_for_each_entry_safe(si, next, &swap_avail_heads[nid], avail_lists[nid]) {
+       plist_for_each_entry_safe(si, next, &swap_avail_head, avail_list) {
                spin_unlock(&swap_avail_lock);
                if (get_swap_device_info(si)) {
                        if (si->flags & SWP_PAGE_DISCARD)
@@ -2890,7 +2889,6 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
        del_from_avail_list(p, true);
        if (p->prio < 0) {
                struct swap_info_struct *si = p;
-               int nid;
 
                plist_for_each_entry_continue(si, &swap_active_head, list) {
                        si->prio++;