diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-03-31 21:11:09 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-04-28 15:26:32 +0000 |
commit | 38f273c5049d5dd3b515200f7f57f1f632489076 (patch) | |
tree | 0c533b37500992d8e1243a0ab1763a78a070ef7d /fs | |
parent | 65f99d35fe87ff282be4b6aeb096e5cf90cb198f (diff) |
f2fs: Use a folio in f2fs_migrate_blocks()
Get a folio from the pagecache and use it throughout. Removes two
calls 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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/f2fs/data.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index efc8e6c0b1d7..5e6638189e78 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -3878,18 +3878,18 @@ static int f2fs_migrate_blocks(struct inode *inode, block_t start_blk, set_inode_flag(inode, FI_SKIP_WRITES); for (blkofs = 0; blkofs <= blkofs_end; blkofs++) { - struct page *page; + struct folio *folio; unsigned int blkidx = secidx * blk_per_sec + blkofs; - page = f2fs_get_lock_data_page(inode, blkidx, true); - if (IS_ERR(page)) { + folio = f2fs_get_lock_data_folio(inode, blkidx, true); + if (IS_ERR(folio)) { f2fs_up_write(&sbi->pin_sem); - ret = PTR_ERR(page); + ret = PTR_ERR(folio); goto done; } - set_page_dirty(page); - f2fs_put_page(page, 1); + folio_mark_dirty(folio); + f2fs_folio_put(folio, true); } clear_inode_flag(inode, FI_SKIP_WRITES); |