@@ -3614,13 +3614,13 @@ int f2fs_allocate_data_block(struct f2fs_sb_info *sbi, struct page *page,
36143614 mutex_unlock (& curseg -> curseg_mutex );
36153615 f2fs_up_read (& SM_I (sbi )-> curseg_lock );
36163616 return 0 ;
3617+
36173618out_err :
36183619 * new_blkaddr = NULL_ADDR ;
36193620 up_write (& sit_i -> sentry_lock );
36203621 mutex_unlock (& curseg -> curseg_mutex );
36213622 f2fs_up_read (& SM_I (sbi )-> curseg_lock );
36223623 return ret ;
3623-
36243624}
36253625
36263626void f2fs_update_device_state (struct f2fs_sb_info * sbi , nid_t ino ,
@@ -3662,8 +3662,7 @@ static void do_write_page(struct f2fs_summary *sum, struct f2fs_io_info *fio)
36623662 & fio -> new_blkaddr , sum , type , fio )) {
36633663 if (fscrypt_inode_uses_fs_layer_crypto (fio -> page -> mapping -> host ))
36643664 fscrypt_finalize_bounce_page (& fio -> encrypted_page );
3665- if (PageWriteback (fio -> page ))
3666- end_page_writeback (fio -> page );
3665+ end_page_writeback (fio -> page );
36673666 if (f2fs_in_warm_node_list (fio -> sbi , fio -> page ))
36683667 f2fs_del_fsync_node_entry (fio -> sbi , fio -> page );
36693668 goto out ;
@@ -3906,7 +3905,7 @@ void f2fs_replace_block(struct f2fs_sb_info *sbi, struct dnode_of_data *dn,
39063905void f2fs_wait_on_page_writeback (struct page * page ,
39073906 enum page_type type , bool ordered , bool locked )
39083907{
3909- if (PageWriteback ( page )) {
3908+ if (folio_test_writeback ( page_folio ( page ) )) {
39103909 struct f2fs_sb_info * sbi = F2FS_P_SB (page );
39113910
39123911 /* submit cached LFS IO */
@@ -3915,7 +3914,8 @@ void f2fs_wait_on_page_writeback(struct page *page,
39153914 f2fs_submit_merged_ipu_write (sbi , NULL , page );
39163915 if (ordered ) {
39173916 wait_on_page_writeback (page );
3918- f2fs_bug_on (sbi , locked && PageWriteback (page ));
3917+ f2fs_bug_on (sbi , locked &&
3918+ folio_test_writeback (page_folio (page )));
39193919 } else {
39203920 wait_for_stable_page (page );
39213921 }
0 commit comments