From: Andrew Morton Date: Fri, 12 Jul 2024 06:36:42 +0000 (-0700) Subject: mm/hugetlb.c: undo errant change X-Git-Tag: v6.11-rc1~85^2~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=998d4e2c33be49297c780e0e59a333918b7c97e4;p=thirdparty%2Fkernel%2Fstable.git mm/hugetlb.c: undo errant change During conflict resolution a line was unintentionally removed by a ksm.c patch. Link: https://lkml.kernel.org/r/85b0d694-d1ac-8e7a-2e50-1edc03eee21a@google.com Fixes: ac90c56bbd73 ("mm/ksm: refactor out try_to_merge_with_zero_page()") Reported-by: Hugh Dickins Cc: Aristeu Rozanski Cc: Chengming Zhou Signed-off-by: Andrew Morton --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 0a69e194b517d..f88ff03339456 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2631,6 +2631,7 @@ static int gather_surplus_pages(struct hstate *h, long delta) retry: spin_unlock_irq(&hugetlb_lock); for (i = 0; i < needed; i++) { + folio = NULL; for_each_node_mask(node, cpuset_current_mems_allowed) { if (!mbind_nodemask || node_isset(node, *mbind_nodemask)) { folio = alloc_surplus_hugetlb_folio(h, htlb_alloc_mask(h),