@@ -902,26 +902,26 @@ static const char * const action_page_types[] = {
902
902
* The page count will stop it from being freed by unpoison.
903
903
* Stress tests should be aware of this memory leak problem.
904
904
*/
905
- static int delete_from_lru_cache (struct page * p )
905
+ static int delete_from_lru_cache (struct folio * folio )
906
906
{
907
- if (isolate_lru_page ( p )) {
907
+ if (folio_isolate_lru ( folio )) {
908
908
/*
909
909
* Clear sensible page flags, so that the buddy system won't
910
- * complain when the page is unpoison-and-freed.
910
+ * complain when the folio is unpoison-and-freed.
911
911
*/
912
- ClearPageActive ( p );
913
- ClearPageUnevictable ( p );
912
+ folio_clear_active ( folio );
913
+ folio_clear_unevictable ( folio );
914
914
915
915
/*
916
916
* Poisoned page might never drop its ref count to 0 so we have
917
917
* to uncharge it manually from its memcg.
918
918
*/
919
- mem_cgroup_uncharge (page_folio ( p ) );
919
+ mem_cgroup_uncharge (folio );
920
920
921
921
/*
922
- * drop the page count elevated by isolate_lru_page ()
922
+ * drop the refcount elevated by folio_isolate_lru ()
923
923
*/
924
- put_page ( p );
924
+ folio_put ( folio );
925
925
return 0 ;
926
926
}
927
927
return - EIO ;
@@ -1019,7 +1019,7 @@ static int me_pagecache_clean(struct page_state *ps, struct page *p)
1019
1019
struct address_space * mapping ;
1020
1020
bool extra_pins ;
1021
1021
1022
- delete_from_lru_cache (p );
1022
+ delete_from_lru_cache (folio );
1023
1023
1024
1024
/*
1025
1025
* For anonymous folios the only reference left
@@ -1146,7 +1146,7 @@ static int me_swapcache_dirty(struct page_state *ps, struct page *p)
1146
1146
/* Trigger EIO in shmem: */
1147
1147
folio_clear_uptodate (folio );
1148
1148
1149
- ret = delete_from_lru_cache (p ) ? MF_FAILED : MF_DELAYED ;
1149
+ ret = delete_from_lru_cache (folio ) ? MF_FAILED : MF_DELAYED ;
1150
1150
folio_unlock (folio );
1151
1151
1152
1152
if (ret == MF_DELAYED )
@@ -1165,7 +1165,7 @@ static int me_swapcache_clean(struct page_state *ps, struct page *p)
1165
1165
1166
1166
delete_from_swap_cache (folio );
1167
1167
1168
- ret = delete_from_lru_cache (p ) ? MF_FAILED : MF_RECOVERED ;
1168
+ ret = delete_from_lru_cache (folio ) ? MF_FAILED : MF_RECOVERED ;
1169
1169
folio_unlock (folio );
1170
1170
1171
1171
if (has_extra_refcount (ps , p , false))
0 commit comments