The patch titled Subject: mm/memory-failure: use helper llist_for_each_entry() has been added to the -mm mm-unstable branch. Its filename is mm-memory-failure-use-helper-llist_for_each_entry.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-memory-failure-use-helper-llist_for_each_entry.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: Yifei Li <liyifei28@xxxxxxxxxx> Subject: mm/memory-failure: use helper llist_for_each_entry() Date: Mon, 13 May 2024 15:58:30 +0800 Change the llist_for_each_entry_safe function to the llist_for_each_entry function and delete the next variable. Because the linked list is not modified,the llist_for_each_entry_safe function is not required. No functional changes are intended. Link: https://lkml.kernel.org/r/20240513075830.2611-1-liyifei28@xxxxxxxxxx Signed-off-by: Yifei Li <liyifei28@xxxxxxxxxx> Acked-by: Miaohe Lin <linmiaohe@xxxxxxxxxx> Cc: Jiaqi Yan <jiaqiyan@xxxxxxxxxx> Cc: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> Cc: Naoya Horiguchi <nao.horiguchi@xxxxxxxxx> Cc: Ryan Roberts <ryan.roberts@xxxxxxx> Cc: Shiyang Ruan <ruansy.fnst@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory-failure.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/mm/memory-failure.c~mm-memory-failure-use-helper-llist_for_each_entry +++ a/mm/memory-failure.c @@ -1935,7 +1935,7 @@ static int folio_set_hugetlb_hwpoison(st { struct llist_head *head; struct raw_hwp_page *raw_hwp; - struct raw_hwp_page *p, *next; + struct raw_hwp_page *p; int ret = folio_test_set_hwpoison(folio) ? -EHWPOISON : 0; /* @@ -1946,7 +1946,7 @@ static int folio_set_hugetlb_hwpoison(st if (folio_test_hugetlb_raw_hwp_unreliable(folio)) return -EHWPOISON; head = raw_hwp_list_head(folio); - llist_for_each_entry_safe(p, next, head->first, node) { + llist_for_each_entry(p, head->first, node) { if (p->page == page) return -EHWPOISON; } _ Patches currently in -mm which might be from liyifei28@xxxxxxxxxx are mm-memory-failure-use-helper-llist_for_each_entry.patch