@@ -267,15 +267,15 @@ void mm_put_huge_zero_folio(struct mm_struct *mm)
267267 put_huge_zero_page ();
268268}
269269
270- static unsigned long shrink_huge_zero_page_count (struct shrinker * shrink ,
271- struct shrink_control * sc )
270+ static unsigned long shrink_huge_zero_folio_count (struct shrinker * shrink ,
271+ struct shrink_control * sc )
272272{
273273 /* we can free zero page only if last reference remains */
274274 return atomic_read (& huge_zero_refcount ) == 1 ? HPAGE_PMD_NR : 0 ;
275275}
276276
277- static unsigned long shrink_huge_zero_page_scan (struct shrinker * shrink ,
278- struct shrink_control * sc )
277+ static unsigned long shrink_huge_zero_folio_scan (struct shrinker * shrink ,
278+ struct shrink_control * sc )
279279{
280280 if (atomic_cmpxchg (& huge_zero_refcount , 1 , 0 ) == 1 ) {
281281 struct folio * zero_folio = xchg (& huge_zero_folio , NULL );
@@ -288,7 +288,7 @@ static unsigned long shrink_huge_zero_page_scan(struct shrinker *shrink,
288288 return 0 ;
289289}
290290
291- static struct shrinker * huge_zero_page_shrinker ;
291+ static struct shrinker * huge_zero_folio_shrinker ;
292292
293293#ifdef CONFIG_SYSFS
294294static ssize_t enabled_show (struct kobject * kobj ,
@@ -850,22 +850,22 @@ static inline void hugepage_exit_sysfs(struct kobject *hugepage_kobj)
850850
851851static int __init thp_shrinker_init (void )
852852{
853- huge_zero_page_shrinker = shrinker_alloc (0 , "thp-zero" );
854- if (!huge_zero_page_shrinker )
853+ huge_zero_folio_shrinker = shrinker_alloc (0 , "thp-zero" );
854+ if (!huge_zero_folio_shrinker )
855855 return - ENOMEM ;
856856
857857 deferred_split_shrinker = shrinker_alloc (SHRINKER_NUMA_AWARE |
858858 SHRINKER_MEMCG_AWARE |
859859 SHRINKER_NONSLAB ,
860860 "thp-deferred_split" );
861861 if (!deferred_split_shrinker ) {
862- shrinker_free (huge_zero_page_shrinker );
862+ shrinker_free (huge_zero_folio_shrinker );
863863 return - ENOMEM ;
864864 }
865865
866- huge_zero_page_shrinker -> count_objects = shrink_huge_zero_page_count ;
867- huge_zero_page_shrinker -> scan_objects = shrink_huge_zero_page_scan ;
868- shrinker_register (huge_zero_page_shrinker );
866+ huge_zero_folio_shrinker -> count_objects = shrink_huge_zero_folio_count ;
867+ huge_zero_folio_shrinker -> scan_objects = shrink_huge_zero_folio_scan ;
868+ shrinker_register (huge_zero_folio_shrinker );
869869
870870 deferred_split_shrinker -> count_objects = deferred_split_count ;
871871 deferred_split_shrinker -> scan_objects = deferred_split_scan ;
@@ -876,7 +876,7 @@ static int __init thp_shrinker_init(void)
876876
877877static void __init thp_shrinker_exit (void )
878878{
879- shrinker_free (huge_zero_page_shrinker );
879+ shrinker_free (huge_zero_folio_shrinker );
880880 shrinker_free (deferred_split_shrinker );
881881}
882882
0 commit comments