@@ -1608,6 +1608,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
1608
1608
enum iostat_type io_type , unsigned int * seq_id )
1609
1609
{
1610
1610
struct f2fs_sb_info * sbi = F2FS_P_SB (page );
1611
+ struct folio * folio = page_folio (page );
1611
1612
nid_t nid ;
1612
1613
struct node_info ni ;
1613
1614
struct f2fs_io_info fio = {
@@ -1624,15 +1625,15 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
1624
1625
};
1625
1626
unsigned int seq ;
1626
1627
1627
- trace_f2fs_writepage (page_folio ( page ) , NODE );
1628
+ trace_f2fs_writepage (folio , NODE );
1628
1629
1629
1630
if (unlikely (f2fs_cp_error (sbi ))) {
1630
1631
/* keep node pages in remount-ro mode */
1631
1632
if (F2FS_OPTION (sbi ).errors == MOUNT_ERRORS_READONLY )
1632
1633
goto redirty_out ;
1633
- ClearPageUptodate ( page );
1634
+ folio_clear_uptodate ( folio );
1634
1635
dec_page_count (sbi , F2FS_DIRTY_NODES );
1635
- unlock_page ( page );
1636
+ folio_unlock ( folio );
1636
1637
return 0 ;
1637
1638
}
1638
1639
@@ -1646,7 +1647,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
1646
1647
1647
1648
/* get old block addr of this node page */
1648
1649
nid = nid_of_node (page );
1649
- f2fs_bug_on (sbi , page -> index != nid );
1650
+ f2fs_bug_on (sbi , folio -> index != nid );
1650
1651
1651
1652
if (f2fs_get_node_info (sbi , nid , & ni , !do_balance ))
1652
1653
goto redirty_out ;
@@ -1660,10 +1661,10 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
1660
1661
1661
1662
/* This page is already truncated */
1662
1663
if (unlikely (ni .blk_addr == NULL_ADDR )) {
1663
- ClearPageUptodate ( page );
1664
+ folio_clear_uptodate ( folio );
1664
1665
dec_page_count (sbi , F2FS_DIRTY_NODES );
1665
1666
f2fs_up_read (& sbi -> node_write );
1666
- unlock_page ( page );
1667
+ folio_unlock ( folio );
1667
1668
return 0 ;
1668
1669
}
1669
1670
@@ -1684,7 +1685,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
1684
1685
* seq_id = seq ;
1685
1686
}
1686
1687
1687
- set_page_writeback ( page );
1688
+ folio_start_writeback ( folio );
1688
1689
1689
1690
fio .old_blkaddr = ni .blk_addr ;
1690
1691
f2fs_do_write_node_page (nid , & fio );
@@ -1697,7 +1698,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
1697
1698
submitted = NULL ;
1698
1699
}
1699
1700
1700
- unlock_page ( page );
1701
+ folio_unlock ( folio );
1701
1702
1702
1703
if (unlikely (f2fs_cp_error (sbi ))) {
1703
1704
f2fs_submit_merged_write (sbi , NODE );
@@ -1711,7 +1712,7 @@ static int __write_node_page(struct page *page, bool atomic, bool *submitted,
1711
1712
return 0 ;
1712
1713
1713
1714
redirty_out :
1714
- redirty_page_for_writepage (wbc , page );
1715
+ folio_redirty_for_writepage (wbc , folio );
1715
1716
return AOP_WRITEPAGE_ACTIVATE ;
1716
1717
}
1717
1718
0 commit comments