@@ -135,7 +135,7 @@ static struct folio *get_current_nat_folio(struct f2fs_sb_info *sbi, nid_t nid)
135
135
return f2fs_get_meta_folio_retry (sbi , current_nat_addr (sbi , nid ));
136
136
}
137
137
138
- static struct page * get_next_nat_page (struct f2fs_sb_info * sbi , nid_t nid )
138
+ static struct folio * get_next_nat_folio (struct f2fs_sb_info * sbi , nid_t nid )
139
139
{
140
140
struct folio * src_folio ;
141
141
struct folio * dst_folio ;
@@ -149,7 +149,7 @@ static struct page *get_next_nat_page(struct f2fs_sb_info *sbi, nid_t nid)
149
149
/* get current nat block page with lock */
150
150
src_folio = get_current_nat_folio (sbi , nid );
151
151
if (IS_ERR (src_folio ))
152
- return & src_folio -> page ;
152
+ return src_folio ;
153
153
dst_folio = f2fs_grab_meta_folio (sbi , dst_off );
154
154
f2fs_bug_on (sbi , folio_test_dirty (src_folio ));
155
155
@@ -161,7 +161,7 @@ static struct page *get_next_nat_page(struct f2fs_sb_info *sbi, nid_t nid)
161
161
162
162
set_to_next_nat (nm_i , nid );
163
163
164
- return & dst_folio -> page ;
164
+ return dst_folio ;
165
165
}
166
166
167
167
static struct nat_entry * __alloc_nat_entry (struct f2fs_sb_info * sbi ,
@@ -3010,7 +3010,7 @@ static int __flush_nat_entry_set(struct f2fs_sb_info *sbi,
3010
3010
bool to_journal = true;
3011
3011
struct f2fs_nat_block * nat_blk ;
3012
3012
struct nat_entry * ne , * cur ;
3013
- struct page * page = NULL ;
3013
+ struct folio * folio = NULL ;
3014
3014
3015
3015
/*
3016
3016
* there are two steps to flush nat entries:
@@ -3024,11 +3024,11 @@ static int __flush_nat_entry_set(struct f2fs_sb_info *sbi,
3024
3024
if (to_journal ) {
3025
3025
down_write (& curseg -> journal_rwsem );
3026
3026
} else {
3027
- page = get_next_nat_page (sbi , start_nid );
3028
- if (IS_ERR (page ))
3029
- return PTR_ERR (page );
3027
+ folio = get_next_nat_folio (sbi , start_nid );
3028
+ if (IS_ERR (folio ))
3029
+ return PTR_ERR (folio );
3030
3030
3031
- nat_blk = page_address ( page );
3031
+ nat_blk = folio_address ( folio );
3032
3032
f2fs_bug_on (sbi , !nat_blk );
3033
3033
}
3034
3034
@@ -3064,8 +3064,8 @@ static int __flush_nat_entry_set(struct f2fs_sb_info *sbi,
3064
3064
if (to_journal ) {
3065
3065
up_write (& curseg -> journal_rwsem );
3066
3066
} else {
3067
- __update_nat_bits (sbi , start_nid , page );
3068
- f2fs_put_page ( page , 1 );
3067
+ __update_nat_bits (sbi , start_nid , & folio -> page );
3068
+ f2fs_folio_put ( folio , true );
3069
3069
}
3070
3070
3071
3071
/* Allow dirty nats by node block allocation in write_begin */
0 commit comments