{
        struct f2fs_sb_info *sbi = F2FS_P_SB(page);
 
-       trace_f2fs_writepage(page, META);
+       trace_f2fs_writepage(page_folio(page), META);
 
        if (unlikely(f2fs_cp_error(sbi))) {
                if (is_sbi_flag_set(sbi, SBI_IS_CLOSE)) {
 static bool f2fs_dirty_meta_folio(struct address_space *mapping,
                struct folio *folio)
 {
-       trace_f2fs_set_page_dirty(&folio->page, META);
+       trace_f2fs_set_page_dirty(folio, META);
 
        if (!folio_test_uptodate(folio))
                folio_mark_uptodate(folio);
 
        struct inode *inode = folio_file_mapping(folio)->host;
        int ret = -EAGAIN;
 
-       trace_f2fs_readpage(&folio->page, DATA);
+       trace_f2fs_readpage(folio, DATA);
 
        if (!f2fs_is_compress_backend_ready(inode)) {
                folio_unlock(folio);
                } else {
                        set_inode_flag(inode, FI_UPDATE_WRITE);
                }
-               trace_f2fs_do_write_data_page(fio->page, IPU);
+               trace_f2fs_do_write_data_page(page_folio(page), IPU);
                return err;
        }
 
 
        /* LFS mode write path */
        f2fs_outplace_write_data(&dn, fio);
-       trace_f2fs_do_write_data_page(page, OPU);
+       trace_f2fs_do_write_data_page(page_folio(page), OPU);
        set_inode_flag(inode, FI_APPEND_WRITE);
 out_writepage:
        f2fs_put_dnode(&dn);
                .last_block = last_block,
        };
 
-       trace_f2fs_writepage(page, DATA);
+       trace_f2fs_writepage(page_folio(page), DATA);
 
        /* we should bypass data pages to proceed the kworker jobs */
        if (unlikely(f2fs_cp_error(sbi))) {
 {
        struct inode *inode = mapping->host;
 
-       trace_f2fs_set_page_dirty(&folio->page, DATA);
+       trace_f2fs_set_page_dirty(folio, DATA);
 
        if (!folio_test_uptodate(folio))
                folio_mark_uptodate(folio);
 
        };
        unsigned int seq;
 
-       trace_f2fs_writepage(page, NODE);
+       trace_f2fs_writepage(page_folio(page), NODE);
 
        if (unlikely(f2fs_cp_error(sbi))) {
                /* keep node pages in remount-ro mode */
 static bool f2fs_dirty_node_folio(struct address_space *mapping,
                struct folio *folio)
 {
-       trace_f2fs_set_page_dirty(&folio->page, NODE);
+       trace_f2fs_set_page_dirty(folio, NODE);
 
        if (!folio_test_uptodate(folio))
                folio_mark_uptodate(folio);
 
                __entry->copied)
 );
 
-DECLARE_EVENT_CLASS(f2fs__page,
+DECLARE_EVENT_CLASS(f2fs__folio,
 
-       TP_PROTO(struct page *page, int type),
+       TP_PROTO(struct folio *folio, int type),
 
-       TP_ARGS(page, type),
+       TP_ARGS(folio, type),
 
        TP_STRUCT__entry(
                __field(dev_t,  dev)
        ),
 
        TP_fast_assign(
-               __entry->dev    = page_file_mapping(page)->host->i_sb->s_dev;
-               __entry->ino    = page_file_mapping(page)->host->i_ino;
+               __entry->dev    = folio_file_mapping(folio)->host->i_sb->s_dev;
+               __entry->ino    = folio_file_mapping(folio)->host->i_ino;
                __entry->type   = type;
                __entry->dir    =
-                       S_ISDIR(page_file_mapping(page)->host->i_mode);
-               __entry->index  = page->index;
-               __entry->dirty  = PageDirty(page);
-               __entry->uptodate = PageUptodate(page);
+                       S_ISDIR(folio_file_mapping(folio)->host->i_mode);
+               __entry->index  = folio_index(folio);
+               __entry->dirty  = folio_test_dirty(folio);
+               __entry->uptodate = folio_test_uptodate(folio);
        ),
 
        TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
                __entry->uptodate)
 );
 
-DEFINE_EVENT(f2fs__page, f2fs_writepage,
+DEFINE_EVENT(f2fs__folio, f2fs_writepage,
 
-       TP_PROTO(struct page *page, int type),
+       TP_PROTO(struct folio *folio, int type),
 
-       TP_ARGS(page, type)
+       TP_ARGS(folio, type)
 );
 
-DEFINE_EVENT(f2fs__page, f2fs_do_write_data_page,
+DEFINE_EVENT(f2fs__folio, f2fs_do_write_data_page,
 
-       TP_PROTO(struct page *page, int type),
+       TP_PROTO(struct folio *folio, int type),
 
-       TP_ARGS(page, type)
+       TP_ARGS(folio, type)
 );
 
-DEFINE_EVENT(f2fs__page, f2fs_readpage,
+DEFINE_EVENT(f2fs__folio, f2fs_readpage,
 
-       TP_PROTO(struct page *page, int type),
+       TP_PROTO(struct folio *folio, int type),
 
-       TP_ARGS(page, type)
+       TP_ARGS(folio, type)
 );
 
-DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty,
+DEFINE_EVENT(f2fs__folio, f2fs_set_page_dirty,
 
-       TP_PROTO(struct page *page, int type),
+       TP_PROTO(struct folio *folio, int type),
 
-       TP_ARGS(page, type)
+       TP_ARGS(folio, type)
 );
 
 TRACE_EVENT(f2fs_replace_atomic_write_block,