Commit dd4d324b authored by Kefeng Wang's avatar Kefeng Wang Committed by Andrew Morton
Browse files

mm: hugetlb: remove struct hstate from init_new_hugetlb_folio()

The struct hstate is never used since commit d67e32f2 ("hugetlb:
restructure pool allocations”), remove it.

Link: https://lkml.kernel.org/r/20250910133958.301467-5-wangkefeng.wang@huawei.com


Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: default avatarOscar Salvador <osalvador@suse.de>
Reviewed-by: default avatarSidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: default avatarJane Chu <jane.chu@oracle.com>
Reviewed-by: default avatarZi Yan <ziy@nvidia.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 4a25f995
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1896,7 +1896,7 @@ static void account_new_hugetlb_folio(struct hstate *h, struct folio *folio)
	h->nr_huge_pages_node[folio_nid(folio)]++;
}

static void init_new_hugetlb_folio(struct hstate *h, struct folio *folio)
static void init_new_hugetlb_folio(struct folio *folio)
{
	__folio_set_hugetlb(folio);
	INIT_LIST_HEAD(&folio->lru);
@@ -1985,7 +1985,7 @@ static struct folio *only_alloc_fresh_hugetlb_folio(struct hstate *h,
		folio = alloc_buddy_hugetlb_folio(order, gfp_mask, nid, nmask,
						  node_alloc_noretry);
	if (folio)
		init_new_hugetlb_folio(h, folio);
		init_new_hugetlb_folio(folio);
	return folio;
}

@@ -3408,7 +3408,7 @@ static void __init gather_bootmem_prealloc_node(unsigned long nid)

		hugetlb_folio_init_vmemmap(folio, h,
					   HUGETLB_VMEMMAP_RESERVE_PAGES);
		init_new_hugetlb_folio(h, folio);
		init_new_hugetlb_folio(folio);

		if (hugetlb_bootmem_page_prehvo(m))
			/*
@@ -4041,7 +4041,7 @@ static long demote_free_hugetlb_folios(struct hstate *src, struct hstate *dst,
			prep_compound_page(page, dst->order);

			new_folio->mapping = NULL;
			init_new_hugetlb_folio(dst, new_folio);
			init_new_hugetlb_folio(new_folio);
			/* Copy the CMA flag so that it is freed correctly */
			if (cma)
				folio_set_hugetlb_cma(new_folio);