]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
mm: update outdated comments for removed scan_swap_map_slots()
authorKexin Sun <kexinsun@smail.nju.edu.cn>
Sat, 21 Mar 2026 10:58:14 +0000 (18:58 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 5 Apr 2026 20:53:35 +0000 (13:53 -0700)
The function scan_swap_map_slots() was removed in commit 0ff67f990bd4
("mm, swap: remove swap slot cache").

The three comments referencing it simply noted that ->flags can be updated
non-atomically by scan_swap_map_slots() to justify a data_race()
annotation.  Since the function no longer exists, drop the parenthetical
reference while keeping the data_race() justification intact: ->flags can
still be updated non-atomically by other paths (e.g., swapoff clearing
SWP_WRITEOK).

Assisted-by: unnamed:deepseek-v3.2 coccinelle
Link: https://lkml.kernel.org/r/20260321105814.7053-1-kexinsun@smail.nju.edu.cn
Signed-off-by: Kexin Sun <kexinsun@smail.nju.edu.cn>
Acked-by: David Hildenbrand (Arm) <david@kernel.org>
Reviewed-by: Lorenzo Stoakes (Oracle) <ljs@kernel.org>
Cc: Axel Rasmussen <axelrasmussen@google.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Barry Song <baohua@kernel.org>
Cc: Chris Li <chrisl@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Julia Lawall <julia.lawall@inria.fr>
Cc: Kairui Song <kasong@tencent.com>
Cc: Kemeng Shi <shikemeng@huaweicloud.com>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Cc: Qi Zheng <zhengqi.arch@bytedance.com>
Cc: Shakeel Butt <shakeel.butt@linux.dev>
Cc: Wei Xu <weixugc@google.com>
Cc: Yuanchu Xie <yuanchu@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_io.c
mm/vmscan.c

index a2c034660c805ffb715e89979dc51af38d1179c3..330abc5ab7b446344c734bd7a93c88330874d31a 100644 (file)
@@ -450,14 +450,14 @@ void __swap_writepage(struct folio *folio, struct swap_iocb **swap_plug)
 
        VM_BUG_ON_FOLIO(!folio_test_swapcache(folio), folio);
        /*
-        * ->flags can be updated non-atomically (scan_swap_map_slots),
+        * ->flags can be updated non-atomically,
         * but that will never affect SWP_FS_OPS, so the data_race
         * is safe.
         */
        if (data_race(sis->flags & SWP_FS_OPS))
                swap_writepage_fs(folio, swap_plug);
        /*
-        * ->flags can be updated non-atomically (scan_swap_map_slots),
+        * ->flags can be updated non-atomically,
         * but that will never affect SWP_SYNCHRONOUS_IO, so the data_race
         * is safe.
         */
index 42f834c508bc0175aa393c08a1c824f2f41550bc..4bf091b1c8afe01f381640b47b8a15510baf3e62 100644 (file)
@@ -1065,7 +1065,7 @@ static bool may_enter_fs(struct folio *folio, gfp_t gfp_mask)
        /*
         * We can "enter_fs" for swap-cache with only __GFP_IO
         * providing this isn't SWP_FS_OPS.
-        * ->flags can be updated non-atomically (scan_swap_map_slots),
+        * ->flags can be updated non-atomically,
         * but that will never affect SWP_FS_OPS, so the data_race
         * is safe.
         */