]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
f2fs: Use a folio in read_normal_summaries()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 31 Mar 2025 20:10:55 +0000 (21:10 +0100)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 28 Apr 2025 15:26:30 +0000 (15:26 +0000)
Get a folio instead of a page.  Saves a hidden 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/segment.c

index ee94834a1caccce9b1690d36270886d31f219664..b4d59afec82b2e807c4aed96c593ea22194ba841 100644 (file)
@@ -4283,7 +4283,7 @@ static int read_normal_summaries(struct f2fs_sb_info *sbi, int type)
        struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi);
        struct f2fs_summary_block *sum;
        struct curseg_info *curseg;
-       struct page *new;
+       struct folio *new;
        unsigned short blk_off;
        unsigned int segno = 0;
        block_t blk_addr = 0;
@@ -4310,10 +4310,10 @@ static int read_normal_summaries(struct f2fs_sb_info *sbi, int type)
                        blk_addr = GET_SUM_BLOCK(sbi, segno);
        }
 
-       new = f2fs_get_meta_page(sbi, blk_addr);
+       new = f2fs_get_meta_folio(sbi, blk_addr);
        if (IS_ERR(new))
                return PTR_ERR(new);
-       sum = (struct f2fs_summary_block *)page_address(new);
+       sum = folio_address(new);
 
        if (IS_NODESEG(type)) {
                if (__exist_node_summaries(sbi)) {
@@ -4348,7 +4348,7 @@ static int read_normal_summaries(struct f2fs_sb_info *sbi, int type)
        curseg->next_blkoff = blk_off;
        mutex_unlock(&curseg->curseg_mutex);
 out:
-       f2fs_put_page(new, 1);
+       f2fs_folio_put(new, true);
        return err;
 }