diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index a6c7dc56a0e1..e434f4f5439c 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -1190,7 +1190,7 @@ int f2fs_reserve_new_block(struct dnode_of_data *dn)
 
 int f2fs_reserve_block(struct dnode_of_data *dn, pgoff_t index)
 {
-	bool need_put = dn->inode_page ? false : true;
+	bool need_put = dn->inode_folio ? false : true;
 	int err;
 
 	err = f2fs_get_dnode_of_data(dn, index, ALLOC_NODE);
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 9f4a041b2d7e..ede550b9f60d 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -994,11 +994,11 @@ struct f2fs_nm_info {
  */
 struct dnode_of_data {
 	struct inode *inode;		/* vfs inode pointer */
-	struct page *inode_page;	/* its inode page, NULL is possible */
+	struct folio *inode_folio;	/* its inode folio, NULL is possible */
 	struct page *node_page;		/* cached direct node page */
 	nid_t nid;			/* node id of the direct node block */
 	unsigned int ofs_in_node;	/* data offset in the node page */
-	bool inode_page_locked;		/* inode page is locked or not */
+	bool inode_folio_locked;	/* inode folio is locked or not */
 	bool node_changed;		/* is node block changed */
 	char cur_level;			/* level of hole node page */
 	char max_level;			/* level of current page located */
@@ -1010,7 +1010,7 @@ static inline void set_new_dnode(struct dnode_of_data *dn, struct inode *inode,
 {
 	memset(dn, 0, sizeof(*dn));
 	dn->inode = inode;
-	dn->inode_page = &ifolio->page;
+	dn->inode_folio = ifolio;
 	dn->node_page = &nfolio->page;
 	dn->nid = nid;
 }
@@ -2882,10 +2882,10 @@ static inline void f2fs_put_dnode(struct dnode_of_data *dn)
 {
 	if (dn->node_page)
 		f2fs_put_page(dn->node_page, 1);
-	if (dn->inode_page && dn->node_page != dn->inode_page)
-		f2fs_put_page(dn->inode_page, 0);
+	if (dn->inode_folio && dn->node_page != &dn->inode_folio->page)
+		f2fs_folio_put(dn->inode_folio, false);
 	dn->node_page = NULL;
-	dn->inode_page = NULL;
+	dn->inode_folio = NULL;
 }
 
 static inline struct kmem_cache *f2fs_kmem_cache_create(const char *name,
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index 919d30034fe0..7a5481006ed3 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -184,7 +184,7 @@ int f2fs_convert_inline_folio(struct dnode_of_data *dn, struct folio *folio)
 
 	f2fs_bug_on(F2FS_F_SB(folio), folio_test_writeback(folio));
 
-	f2fs_do_read_inline_data(folio, dn->inode_page);
+	f2fs_do_read_inline_data(folio, &dn->inode_folio->page);
 	folio_mark_dirty(folio);
 
 	/* clear dirty state */
@@ -205,8 +205,8 @@ int f2fs_convert_inline_folio(struct dnode_of_data *dn, struct folio *folio)
 	set_inode_flag(dn->inode, FI_APPEND_WRITE);
 
 	/* clear inline data and flag after data writeback */
-	f2fs_truncate_inline_inode(dn->inode, dn->inode_page, 0);
-	clear_page_private_inline(dn->inode_page);
+	f2fs_truncate_inline_inode(dn->inode, &dn->inode_folio->page, 0);
+	clear_page_private_inline(&dn->inode_folio->page);
 clear_out:
 	stat_dec_inline_inode(dn->inode);
 	clear_inode_flag(dn->inode, FI_INLINE_DATA);
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index e9e33241e762..bf583cd2a589 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -778,12 +778,12 @@ int f2fs_get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode)
 
 	nids[0] = dn->inode->i_ino;
 
-	if (!dn->inode_page) {
+	if (!dn->inode_folio) {
 		nfolio[0] = f2fs_get_inode_folio(sbi, nids[0]);
 		if (IS_ERR(nfolio[0]))
 			return PTR_ERR(nfolio[0]);
 	} else {
-		nfolio[0] = page_folio(dn->inode_page);
+		nfolio[0] = dn->inode_folio;
 	}
 
 	/* if inline_data is set, should not report any block indices */
@@ -796,8 +796,8 @@ int f2fs_get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode)
 	parent = nfolio[0];
 	if (level != 0)
 		nids[1] = get_nid(&parent->page, offset[0], true);
-	dn->inode_page = &nfolio[0]->page;
-	dn->inode_page_locked = true;
+	dn->inode_folio = nfolio[0];
+	dn->inode_folio_locked = true;
 
 	/* get indirect or direct nodes */
 	for (i = 1; i <= level; i++) {
@@ -830,7 +830,7 @@ int f2fs_get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode)
 			done = true;
 		}
 		if (i == 1) {
-			dn->inode_page_locked = false;
+			dn->inode_folio_locked = false;
 			folio_unlock(parent);
 		} else {
 			f2fs_folio_put(parent, true);
@@ -888,7 +888,7 @@ int f2fs_get_dnode_of_data(struct dnode_of_data *dn, pgoff_t index, int mode)
 	if (i > 1)
 		f2fs_folio_put(nfolio[0], false);
 release_out:
-	dn->inode_page = NULL;
+	dn->inode_folio = NULL;
 	dn->node_page = NULL;
 	if (err == -ENOENT) {
 		dn->cur_level = i;
@@ -1070,7 +1070,7 @@ static int truncate_partial_nodes(struct dnode_of_data *dn,
 	int i;
 	int idx = depth - 2;
 
-	nid[0] = get_nid(dn->inode_page, offset[0], true);
+	nid[0] = get_nid(&dn->inode_folio->page, offset[0], true);
 	if (!nid[0])
 		return 0;
 
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index ac8f2d0763a4..69d8eaaf9013 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -537,9 +537,9 @@ static int check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
 
 	if (dn->inode->i_ino == nid) {
 		tdn.nid = nid;
-		if (!dn->inode_page_locked)
-			lock_page(dn->inode_page);
-		tdn.node_page = dn->inode_page;
+		if (!dn->inode_folio_locked)
+			folio_lock(dn->inode_folio);
+		tdn.node_page = &dn->inode_folio->page;
 		tdn.ofs_in_node = ofs_in_node;
 		goto truncate_out;
 	} else if (dn->nid == nid) {
@@ -580,8 +580,8 @@ static int check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
 	 * if inode page is locked, unlock temporarily, but its reference
 	 * count keeps alive.
 	 */
-	if (ino == dn->inode->i_ino && dn->inode_page_locked)
-		unlock_page(dn->inode_page);
+	if (ino == dn->inode->i_ino && dn->inode_folio_locked)
+		folio_unlock(dn->inode_folio);
 
 	set_new_dnode(&tdn, inode, NULL, NULL, 0);
 	if (f2fs_get_dnode_of_data(&tdn, bidx, LOOKUP_NODE))
@@ -594,15 +594,15 @@ static int check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
 out:
 	if (ino != dn->inode->i_ino)
 		iput(inode);
-	else if (dn->inode_page_locked)
-		lock_page(dn->inode_page);
+	else if (dn->inode_folio_locked)
+		folio_lock(dn->inode_folio);
 	return 0;
 
 truncate_out:
 	if (f2fs_data_blkaddr(&tdn) == blkaddr)
 		f2fs_truncate_data_blocks_range(&tdn, 1);
-	if (dn->inode->i_ino == nid && !dn->inode_page_locked)
-		unlock_page(dn->inode_page);
+	if (dn->inode->i_ino == nid && !dn->inode_folio_locked)
+		folio_unlock(dn->inode_folio);
 	return 0;
 }
 
