The patch titled Subject: swap: cleanup duplicated WARN_ON in add_to_avail_list has been added to the -mm mm-unstable branch. Its filename is swap-cleanup-duplicated-warn_on-in-add_to_avail_list.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/swap-cleanup-duplicated-warn_on-in-add_to_avail_list.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm 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 the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Ma Wupeng <mawupeng1@xxxxxxxxxx> Subject: swap: cleanup duplicated WARN_ON in add_to_avail_list Date: Tue, 27 Jun 2023 20:08:32 +0800 Patch series "fix WARN_ON in add_to_avail_list". Empty check for plist_node is checked in add_to_avail_list and plist_add. Drop the duplicate one in add_to_avail_list. Link: https://lkml.kernel.org/r/20230627120833.2230766-1-mawupeng1@xxxxxxxxxx Link: https://lkml.kernel.org/r/20230627120833.2230766-2-mawupeng1@xxxxxxxxxx Signed-off-by: Ma Wupeng <mawupeng1@xxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/swapfile.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/mm/swapfile.c~swap-cleanup-duplicated-warn_on-in-add_to_avail_list +++ a/mm/swapfile.c @@ -714,10 +714,8 @@ static void add_to_avail_list(struct swa int nid; spin_lock(&swap_avail_lock); - for_each_node(nid) { - WARN_ON(!plist_node_empty(&p->avail_lists[nid])); + for_each_node(nid) plist_add(&p->avail_lists[nid], &swap_avail_heads[nid]); - } spin_unlock(&swap_avail_lock); } _ Patches currently in -mm which might be from mawupeng1@xxxxxxxxxx are swap-cleanup-duplicated-warn_on-in-add_to_avail_list.patch swap-stop-add-to-avail-list-is-swap-is-full.patch