mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
f2fs: Use a folio in build_sit_entries()
Convert get_current_sit_page() to get_current_sit_folio() and then use the folio in build_sit_entries(). 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>
This commit is contained in:
parent
d6f3066301
commit
6225716f38
|
|
@ -4497,10 +4497,10 @@ int f2fs_lookup_journal_in_cursum(struct f2fs_journal *journal, int type,
|
|||
return -1;
|
||||
}
|
||||
|
||||
static struct page *get_current_sit_page(struct f2fs_sb_info *sbi,
|
||||
static struct folio *get_current_sit_folio(struct f2fs_sb_info *sbi,
|
||||
unsigned int segno)
|
||||
{
|
||||
return f2fs_get_meta_page(sbi, current_sit_addr(sbi, segno));
|
||||
return f2fs_get_meta_folio(sbi, current_sit_addr(sbi, segno));
|
||||
}
|
||||
|
||||
static struct folio *get_next_sit_folio(struct f2fs_sb_info *sbi,
|
||||
|
|
@ -4922,15 +4922,15 @@ static int build_sit_entries(struct f2fs_sb_info *sbi)
|
|||
|
||||
for (; start < end && start < MAIN_SEGS(sbi); start++) {
|
||||
struct f2fs_sit_block *sit_blk;
|
||||
struct page *page;
|
||||
struct folio *folio;
|
||||
|
||||
se = &sit_i->sentries[start];
|
||||
page = get_current_sit_page(sbi, start);
|
||||
if (IS_ERR(page))
|
||||
return PTR_ERR(page);
|
||||
sit_blk = (struct f2fs_sit_block *)page_address(page);
|
||||
folio = get_current_sit_folio(sbi, start);
|
||||
if (IS_ERR(folio))
|
||||
return PTR_ERR(folio);
|
||||
sit_blk = folio_address(folio);
|
||||
sit = sit_blk->entries[SIT_ENTRY_OFFSET(sit_i, start)];
|
||||
f2fs_put_page(page, 1);
|
||||
f2fs_folio_put(folio, true);
|
||||
|
||||
err = check_block_count(sbi, start, &sit);
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user