f2fs: Use a folio in f2fs_truncate_xattr_node()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 31 Mar 2025 20:11:54 +0000 (21:11 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 28 Apr 2025 15:26:39 +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/node.c

index 9e53025b9d142bfb6d73f1da4e110eb5190e7192..b186f53d7e02a33ce78d56c67a87081588d7ae83 100644 (file)
@@ -1242,20 +1242,20 @@ int f2fs_truncate_xattr_node(struct inode *inode)
        struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
        nid_t nid = F2FS_I(inode)->i_xattr_nid;
        struct dnode_of_data dn;
-       struct page *npage;
+       struct folio *nfolio;
        int err;
 
        if (!nid)
                return 0;
 
-       npage = f2fs_get_xnode_page(sbi, nid);
-       if (IS_ERR(npage))
-               return PTR_ERR(npage);
+       nfolio = f2fs_get_xnode_folio(sbi, nid);
+       if (IS_ERR(nfolio))
+               return PTR_ERR(nfolio);
 
-       set_new_dnode(&dn, inode, NULL, npage, nid);
+       set_new_dnode(&dn, inode, NULL, &nfolio->page, nid);
        err = truncate_node(&dn);
        if (err) {
-               f2fs_put_page(npage, 1);
+               f2fs_folio_put(nfolio, true);
                return err;
        }