f2fs: Use a folio in f2fs_update_inode_page()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 31 Mar 2025 20:12:06 +0000 (21:12 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 28 Apr 2025 15:26:41 +0000 (15:26 +0000)
Remove a call to compound_head().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/inode.c

index fa1a6db2665bbefe60a0c54a07732c98a3d11db5..8ef49b769a432bef33110cadbb1ab440dd7ad5df 100644 (file)
@@ -760,12 +760,12 @@ void f2fs_update_inode(struct inode *inode, struct page *node_page)
 void f2fs_update_inode_page(struct inode *inode)
 {
        struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
-       struct page *node_page;
+       struct folio *node_folio;
        int count = 0;
 retry:
-       node_page = f2fs_get_inode_page(sbi, inode->i_ino);
-       if (IS_ERR(node_page)) {
-               int err = PTR_ERR(node_page);
+       node_folio = f2fs_get_inode_folio(sbi, inode->i_ino);
+       if (IS_ERR(node_folio)) {
+               int err = PTR_ERR(node_folio);
 
                /* The node block was truncated. */
                if (err == -ENOENT)
@@ -780,8 +780,8 @@ stop_checkpoint:
                f2fs_stop_checkpoint(sbi, false, STOP_CP_REASON_UPDATE_INODE);
                return;
        }
-       f2fs_update_inode(inode, node_page);
-       f2fs_put_page(node_page, 1);
+       f2fs_update_inode(inode, &node_folio->page);
+       f2fs_folio_put(node_folio, true);
 }
 
 int f2fs_write_inode(struct inode *inode, struct writeback_control *wbc)