Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mm: page_alloc: make compound_page_dtors static

It's only used inside page_alloc.c now. So make it static and remove the
declaration in mm.h.

Link: https://lkml.kernel.org/r/20230617034622.1235913-1-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Miaohe Lin and committed by
Andrew Morton
cf01724e ff71f26f

+1 -2
-1
include/linux/mm.h
··· 1220 1220 #endif 1221 1221 NR_COMPOUND_DTORS, 1222 1222 }; 1223 - extern compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS]; 1224 1223 1225 1224 static inline void folio_set_compound_dtor(struct folio *folio, 1226 1225 enum compound_dtor_id compound_dtor)
+1 -1
mm/page_alloc.c
··· 284 284 #endif 285 285 }; 286 286 287 - compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS] = { 287 + static compound_page_dtor * const compound_page_dtors[NR_COMPOUND_DTORS] = { 288 288 [NULL_COMPOUND_DTOR] = NULL, 289 289 [COMPOUND_PAGE_DTOR] = free_compound_page, 290 290 #ifdef CONFIG_HUGETLB_PAGE