]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/swap: remove boilerplate
authorYu Zhao <yuzhao@google.com>
Thu, 11 Jul 2024 02:13:17 +0000 (20:13 -0600)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 17 Aug 2024 00:52:33 +0000 (17:52 -0700)
commit55d55a44b5b03c54b5bce6fcecdeae78fae9bf26
tree98860c5de244cc5e4cc49350529a18101f78deeb
parenta804afe88cabeb69cfc5d93ce2ee0c8a9cadfd26
mm/swap: remove boilerplate

Remove boilerplate by using a macro to choose the corresponding lock and
handler for each folio_batch in cpu_fbatches.

[yuzhao@google.com: fix "BUG: using smp_processor_id() in preemptible"]
Link: https://lkml.kernel.org/r/ZqNHHMiHn-9vy_II@google.com
Link: https://lkml.kernel.org/r/20240711021317.596178-6-yuzhao@google.com
Signed-off-by: Yu Zhao <yuzhao@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Barry Song <21cnbao@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/swap.c