@@ -266,15 +266,15 @@ void mm_put_huge_zero_folio(struct mm_struct *mm)
266266 put_huge_zero_page ();
267267}
268268
269- static unsigned long shrink_huge_zero_page_count (struct shrinker * shrink ,
270- struct shrink_control * sc )
269+ static unsigned long shrink_huge_zero_folio_count (struct shrinker * shrink ,
270+ struct shrink_control * sc )
271271{
272272 /* we can free zero page only if last reference remains */
273273 return atomic_read (& huge_zero_refcount ) == 1 ? HPAGE_PMD_NR : 0 ;
274274}
275275
276- static unsigned long shrink_huge_zero_page_scan (struct shrinker * shrink ,
277- struct shrink_control * sc )
276+ static unsigned long shrink_huge_zero_folio_scan (struct shrinker * shrink ,
277+ struct shrink_control * sc )
278278{
279279 if (atomic_cmpxchg (& huge_zero_refcount , 1 , 0 ) == 1 ) {
280280 struct folio * zero_folio = xchg (& huge_zero_folio , NULL );
@@ -287,7 +287,7 @@ static unsigned long shrink_huge_zero_page_scan(struct shrinker *shrink,
287287 return 0 ;
288288}
289289
290- static struct shrinker * huge_zero_page_shrinker ;
290+ static struct shrinker * huge_zero_folio_shrinker ;
291291
292292#ifdef CONFIG_SYSFS
293293static ssize_t enabled_show (struct kobject * kobj ,
@@ -849,22 +849,22 @@ static inline void hugepage_exit_sysfs(struct kobject *hugepage_kobj)
849849
850850static int __init thp_shrinker_init (void )
851851{
852- huge_zero_page_shrinker = shrinker_alloc (0 , "thp-zero" );
853- if (!huge_zero_page_shrinker )
852+ huge_zero_folio_shrinker = shrinker_alloc (0 , "thp-zero" );
853+ if (!huge_zero_folio_shrinker )
854854 return - ENOMEM ;
855855
856856 deferred_split_shrinker = shrinker_alloc (SHRINKER_NUMA_AWARE |
857857 SHRINKER_MEMCG_AWARE |
858858 SHRINKER_NONSLAB ,
859859 "thp-deferred_split" );
860860 if (!deferred_split_shrinker ) {
861- shrinker_free (huge_zero_page_shrinker );
861+ shrinker_free (huge_zero_folio_shrinker );
862862 return - ENOMEM ;
863863 }
864864
865- huge_zero_page_shrinker -> count_objects = shrink_huge_zero_page_count ;
866- huge_zero_page_shrinker -> scan_objects = shrink_huge_zero_page_scan ;
867- shrinker_register (huge_zero_page_shrinker );
865+ huge_zero_folio_shrinker -> count_objects = shrink_huge_zero_folio_count ;
866+ huge_zero_folio_shrinker -> scan_objects = shrink_huge_zero_folio_scan ;
867+ shrinker_register (huge_zero_folio_shrinker );
868868
869869 deferred_split_shrinker -> count_objects = deferred_split_count ;
870870 deferred_split_shrinker -> scan_objects = deferred_split_scan ;
@@ -875,7 +875,7 @@ static int __init thp_shrinker_init(void)
875875
876876static void __init thp_shrinker_exit (void )
877877{
878- shrinker_free (huge_zero_page_shrinker );
878+ shrinker_free (huge_zero_folio_shrinker );
879879 shrinker_free (deferred_split_shrinker );
880880}
881881
0 commit comments