]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - mm/compaction.c
mm: remove shmem_mapping() shmem_zero_setup() duplicates
[mirror_ubuntu-jammy-kernel.git] / mm / compaction.c
index c6178bbd3e044ed08476cf52cb83626c836bbfc2..0fdfde016ee283279b9a81c9b3e8f72f2ce3b353 100644 (file)
@@ -802,7 +802,7 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
                                        locked = false;
                                }
 
-                               if (isolate_movable_page(page, isolate_mode))
+                               if (!isolate_movable_page(page, isolate_mode))
                                        goto isolate_success;
                        }
 
@@ -1966,6 +1966,13 @@ void wakeup_kcompactd(pg_data_t *pgdat, int order, int classzone_idx)
        if (pgdat->kcompactd_max_order < order)
                pgdat->kcompactd_max_order = order;
 
+       /*
+        * Pairs with implicit barrier in wait_event_freezable()
+        * such that wakeups are not missed in the lockless
+        * waitqueue_active() call.
+        */
+       smp_acquire__after_ctrl_dep();
+
        if (pgdat->kcompactd_classzone_idx > classzone_idx)
                pgdat->kcompactd_classzone_idx = classzone_idx;