WSL2-Linux-Kernel/include
Hugh Dickins c5eda6029c mm: __isolate_lru_page_prepare() in isolate_migratepages_block()
[ Upstream commit 89f6c88a6a ]

__isolate_lru_page_prepare() conflates two unrelated functions, with the
flags to one disjoint from the flags to the other; and hides some of the
important checks outside of isolate_migratepages_block(), where the
sequence is better to be visible.  It comes from the days of lumpy
reclaim, before compaction, when the combination made more sense.

Move what's needed by mm/compaction.c isolate_migratepages_block() inline
there, and what's needed by mm/vmscan.c isolate_lru_pages() inline there.

Shorten "isolate_mode" to "mode", so the sequence of conditions is easier
to read.  Declare a "mapping" variable, to save one call to page_mapping()
(but not another: calling again after page is locked is necessary).
Simplify isolate_lru_pages() with a "move_to" list pointer.

Link: https://lkml.kernel.org/r/879d62a8-91cc-d3c6-fb3b-69768236df68@google.com
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Alex Shi <alexs@kernel.org>
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stable-dep-of: 829ae0f81c ("mm: migrate: fix THP's mapcount on isolation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:28:44 +01:00
..
acpi ACPI: APEI: Fix integer overflow in ghes_estatus_pool_init() 2022-11-10 18:15:34 +01:00
asm-generic vmlinux.lds.h: Fix placement of '.data..decrypted' section 2022-11-16 09:58:26 +01:00
clocksource
crypto crypto: blake2s - remove shash module 2022-08-17 14:24:19 +02:00
drm drm/bridge: Add stubs for devm_drm_of_get_bridge when OF is disabled 2022-09-05 10:30:03 +02:00
dt-bindings clk: qcom: gcc-msm8939: Add missing SYSTEM_MM_NOC_BFDCD_CLK_SRC 2022-08-17 14:23:45 +02:00
keys
kunit kunit: fix kernel-doc warnings due to mismatched arg names 2021-10-06 17:54:07 -06:00
kvm KVM: arm64: Fix PMU probe ordering 2021-09-20 12:43:34 +01:00
linux mm: __isolate_lru_page_prepare() in isolate_migratepages_block() 2022-12-08 11:28:44 +01:00
math-emu
media media: v4l: subdev: Fail graciously when getting try data for NULL state 2022-11-10 18:15:34 +01:00
memory memory: renesas-rpc-if: Fix HF/OSPI data transfer in Manual Mode 2022-05-09 09:14:34 +02:00
misc
net sctp: fix memory leak in sctp_stream_outq_migrate() 2022-12-08 11:28:41 +01:00
pcmcia
ras Revert "mm/memory-failure.c: fix race with changing page compound again" 2022-07-12 16:35:17 +02:00
rdma RDMA/netlink: Add __maybe_unused to static inline in C file 2021-11-25 09:49:07 +01:00
scsi scsi: iscsi: Add recv workqueue helpers 2022-10-26 12:35:15 +02:00
soc ARM: at91: pm: avoid soft resetting AC DLL 2022-11-26 09:24:34 +01:00
sound ALSA: control: Use deferred fasync helper 2022-08-25 11:40:44 +02:00
target scsi: target: Fix ordered tag handling 2021-11-25 09:48:29 +01:00
trace rxrpc: Use refcount_t rather than atomic_t 2022-12-02 17:41:04 +01:00
uapi audit: fix undefined behavior in bit shift for AUDIT_BIT 2022-12-02 17:41:01 +01:00
vdso
video video: of_display_timing.h: include errno.h 2022-07-12 16:35:10 +02:00
xen xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-11 12:22:37 +01:00