diff options
| author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2025-03-31 21:12:43 +0100 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2025-04-28 15:26:46 +0000 |
| commit | 97e1b86169b3d9573a26b80f5f6ccada903394d2 (patch) | |
| tree | fc702537689a23679ad7a635fafdc2f5c266dae7 /fs/f2fs | |
| parent | 5951fee46befbf6176c86482432f4f76e522f16c (diff) | |
f2fs: Use a folio in f2fs_wait_on_block_writeback()
Fetch a folio from the pagecache and use it. 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/f2fs')
| -rw-r--r-- | fs/f2fs/segment.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 059dacbca2d0..1fcf8798683e 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -4184,7 +4184,7 @@ void f2fs_folio_wait_writeback(struct folio *folio, enum page_type type, void f2fs_wait_on_block_writeback(struct inode *inode, block_t blkaddr) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); - struct page *cpage; + struct folio *cfolio; if (!f2fs_meta_inode_gc_required(inode)) return; @@ -4192,10 +4192,10 @@ void f2fs_wait_on_block_writeback(struct inode *inode, block_t blkaddr) if (!__is_valid_data_blkaddr(blkaddr)) return; - cpage = find_lock_page(META_MAPPING(sbi), blkaddr); - if (cpage) { - f2fs_wait_on_page_writeback(cpage, DATA, true, true); - f2fs_put_page(cpage, 1); + cfolio = filemap_lock_folio(META_MAPPING(sbi), blkaddr); + if (!IS_ERR(cfolio)) { + f2fs_folio_wait_writeback(cfolio, DATA, true, true); + f2fs_folio_put(cfolio, true); } } |
