The quilt patch titled Subject: mm: filter out swapin error entry in shmem mapping has been removed from the -mm tree. Its filename was mm-filter-out-swapin-error-entry-in-shmem-mapping.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Miaohe Lin <linmiaohe@xxxxxxxxxx> Subject: mm: filter out swapin error entry in shmem mapping Date: Thu, 19 May 2022 20:50:30 +0800 There might be swapin error entries in shmem mapping. Filter them out to avoid "Bad swap file entry" complaint. Link: https://lkml.kernel.org/r/20220519125030.21486-6-linmiaohe@xxxxxxxxxx Signed-off-by: Miaohe Lin <linmiaohe@xxxxxxxxxx> Reviewed-by: Naoya Horiguchi <naoya.horiguchi@xxxxxxx> Cc: Alistair Popple <apopple@xxxxxxxxxx> Cc: David Hildenbrand <david@xxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Cc: NeilBrown <neilb@xxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> Cc: Ralph Campbell <rcampbell@xxxxxxxxxx> Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/madvise.c | 5 ++++- mm/swap_state.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) --- a/mm/madvise.c~mm-filter-out-swapin-error-entry-in-shmem-mapping +++ a/mm/madvise.c @@ -248,10 +248,13 @@ static void force_shm_swapin_readahead(s if (!xa_is_value(page)) continue; + swap = radix_to_swp_entry(page); + /* There might be swapin error entries in shmem mapping. */ + if (non_swap_entry(swap)) + continue; xas_pause(&xas); rcu_read_unlock(); - swap = radix_to_swp_entry(page); page = read_swap_cache_async(swap, GFP_HIGHUSER_MOVABLE, NULL, 0, false, &splug); if (page) --- a/mm/swap_state.c~mm-filter-out-swapin-error-entry-in-shmem-mapping +++ a/mm/swap_state.c @@ -410,6 +410,9 @@ struct page *find_get_incore_page(struct return NULL; swp = radix_to_swp_entry(page); + /* There might be swapin error entries in shmem mapping. */ + if (non_swap_entry(swp)) + return NULL; /* Prevent swapoff from happening to us */ si = get_swap_device(swp); if (!si) _ Patches currently in -mm which might be from linmiaohe@xxxxxxxxxx are