* + mm-update-outdated-comments-for-removed-scan_swap_map_slots.patch added to mm-new branch
@ 2026-03-21 17:57 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-03-21 17:57 UTC (permalink / raw)
To: mm-commits, zhengqi.arch, yuanchu, weixugc, shikemeng,
shakeel.butt, nphamcs, mhocko, lorenzo.stoakes, ljs, kasong,
julia.lawall, hannes, david, chrisl, bhe, baohua, axelrasmussen,
kexinsun, akpm
The patch titled
Subject: mm: update outdated comments for removed scan_swap_map_slots()
has been added to the -mm mm-new branch. Its filename is
mm-update-outdated-comments-for-removed-scan_swap_map_slots.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-update-outdated-comments-for-removed-scan_swap_map_slots.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
The mm-new branch of mm.git is not included in linux-next
If a few days of testing in mm-new is successful, the patch will me moved
into mm.git's mm-unstable branch, which is included in linux-next
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Kexin Sun <kexinsun@smail.nju.edu.cn>
Subject: mm: update outdated comments for removed scan_swap_map_slots()
Date: Sat, 21 Mar 2026 18:58:14 +0800
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>
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: David Hildenbrand <david@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: Lorenzo Stoakes <ljs@kernel.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.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 | 4 ++--
mm/vmscan.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- a/mm/page_io.c~mm-update-outdated-comments-for-removed-scan_swap_map_slots
+++ a/mm/page_io.c
@@ -454,14 +454,14 @@ void __swap_writepage(struct folio *foli
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.
*/
--- a/mm/vmscan.c~mm-update-outdated-comments-for-removed-scan_swap_map_slots
+++ a/mm/vmscan.c
@@ -1046,7 +1046,7 @@ static bool may_enter_fs(struct folio *f
/*
* 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.
*/
_
Patches currently in -mm which might be from kexinsun@smail.nju.edu.cn are
kasan-update-outdated-comment.patch
mm-vmalloc-update-outdated-comment-for-renamed-vread.patch
mm-update-outdated-comments-for-removed-scan_swap_map_slots.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-21 17:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-21 17:57 + mm-update-outdated-comments-for-removed-scan_swap_map_slots.patch added to mm-new branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.