linux/include
Miaohe Lin 072e7412e8 mm/migration: return errno when isolate_huge_page failed
[ Upstream commit 7ce82f4c3f ]

We might fail to isolate huge page due to e.g.  the page is under
migration which cleared HPageMigratable.  We should return errno in this
case rather than always return 1 which could confuse the user, i.e.  the
caller might think all of the memory is migrated while the hugetlb page is
left behind.  We make the prototype of isolate_huge_page consistent with
isolate_lru_page as suggested by Huang Ying and rename isolate_huge_page
to isolate_hugetlb as suggested by Muchun to improve the readability.

Link: https://lkml.kernel.org/r/20220530113016.16663-4-linmiaohe@huawei.com
Fixes: e8db67eb0d ("mm: migrate: move_pages() supports thp migration")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Suggested-by: Huang Ying <ying.huang@intel.com>
Reported-by: kernel test robot <lkp@intel.com> (build error)
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Peter Xu <peterx@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Stable-dep-of: 73bdf65ea7 ("migrate: hugetlb: check for hugetlb shared PMD in node migration")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-14 19:17:56 +01:00
..
acpi ACPI: APEI: Fix integer overflow in ghes_estatus_pool_init() 2022-11-10 18:15:34 +01:00
asm-generic mm/khugepaged: fix GUP-fast interaction by sending IPI 2022-12-14 11:37:17 +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: imx8mn: rename vpu_pll to m7_alt_pll 2022-12-31 13:14:12 +01: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/migration: return errno when isolate_huge_page failed 2023-02-14 19:17:56 +01:00
math-emu
media media: dvbdev: fix build warning due to comments 2022-12-31 13:14:47 +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 l2tp: Serialize access to sk_user_data with sk_callback_lock 2023-02-01 08:27:09 +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_tcp: Fix UAF during logout when accessing the shost ipaddress 2023-02-09 11:26:39 +01:00
soc ARM: at91: pm: avoid soft resetting AC DLL 2022-11-26 09:24:34 +01:00
sound ASoC/SoundWire: dai: expand 'stream' concept beyond SoundWire 2023-01-12 11:58:49 +01:00
target scsi: target: Fix ordered tag handling 2021-11-25 09:48:29 +01:00
trace tracing: Use alignof__(struct {type b;}) instead of offsetof() 2023-01-24 07:22:48 +01:00
uapi netfilter: conntrack: unify established states for SCTP paths 2023-02-01 08:27:30 +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