aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifei Li <[email protected]>2024-05-13 15:58:30 +0800
committerAndrew Morton <[email protected]>2024-07-03 19:29:59 -0700
commit1e25501dbcee8fdfe687ec66e773d04edd1807af (patch)
treebfe30dabe9899bfc224eea29ad52879589a48c88
parent3a103b5315b78a0d58fa8dc95d70d9b907400f5e (diff)
mm/memory-failure: use helper llist_for_each_entry()
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/[email protected] Signed-off-by: Yifei Li <[email protected]> Acked-by: Miaohe Lin <[email protected]> Cc: Jiaqi Yan <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Naoya Horiguchi <[email protected]> Cc: Ryan Roberts <[email protected]> Cc: Shiyang Ruan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--mm/memory-failure.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index fc9ce331eb16..b419170fce20 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1935,7 +1935,7 @@ static int folio_set_hugetlb_hwpoison(struct folio *folio, struct page *page)
{
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(struct folio *folio, struct page *page)
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;
}