@@ -3698,7 +3698,8 @@ static int f2fs_write_end(struct file *file,
3698
3698
loff_t pos , unsigned len , unsigned copied ,
3699
3699
struct page * page , void * fsdata )
3700
3700
{
3701
- struct inode * inode = page -> mapping -> host ;
3701
+ struct folio * folio = page_folio (page );
3702
+ struct inode * inode = folio -> mapping -> host ;
3702
3703
3703
3704
trace_f2fs_write_end (inode , pos , len , copied );
3704
3705
@@ -3707,17 +3708,17 @@ static int f2fs_write_end(struct file *file,
3707
3708
* should be PAGE_SIZE. Otherwise, we treat it with zero copied and
3708
3709
* let generic_perform_write() try to copy data again through copied=0.
3709
3710
*/
3710
- if (!PageUptodate ( page )) {
3711
+ if (!folio_test_uptodate ( folio )) {
3711
3712
if (unlikely (copied != len ))
3712
3713
copied = 0 ;
3713
3714
else
3714
- SetPageUptodate ( page );
3715
+ folio_mark_uptodate ( folio );
3715
3716
}
3716
3717
3717
3718
#ifdef CONFIG_F2FS_FS_COMPRESSION
3718
3719
/* overwrite compressed file */
3719
3720
if (f2fs_compressed_file (inode ) && fsdata ) {
3720
- f2fs_compress_write_end (inode , fsdata , page -> index , copied );
3721
+ f2fs_compress_write_end (inode , fsdata , folio -> index , copied );
3721
3722
f2fs_update_time (F2FS_I_SB (inode ), REQ_TIME );
3722
3723
3723
3724
if (pos + copied > i_size_read (inode ) &&
@@ -3730,10 +3731,10 @@ static int f2fs_write_end(struct file *file,
3730
3731
if (!copied )
3731
3732
goto unlock_out ;
3732
3733
3733
- set_page_dirty ( page );
3734
+ folio_mark_dirty ( folio );
3734
3735
3735
3736
if (f2fs_is_atomic_file (inode ))
3736
- set_page_private_atomic (page );
3737
+ set_page_private_atomic (folio_page ( folio , 0 ) );
3737
3738
3738
3739
if (pos + copied > i_size_read (inode ) &&
3739
3740
!f2fs_verity_in_progress (inode )) {
0 commit comments