summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/checkpoint.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2025-03-31 21:10:30 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2025-04-28 15:22:43 +0000
commitb15ca18571578f776782b7347831cf14a57e8018 (patch)
tree9039edcd9389d46390cc906b5b8db8d9638400ef /fs/f2fs/checkpoint.c
parentf2fs: Use a folio in f2fs_quota_read() (diff)
downloadlinux-b15ca18571578f776782b7347831cf14a57e8018.tar.gz
linux-b15ca18571578f776782b7347831cf14a57e8018.zip
f2fs: Add f2fs_grab_meta_folio()
Turn f2fs_grab_meta_page() into a wrapper around f2fs_grab_meta_folio(). Saves three hidden 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/checkpoint.c')
-rw-r--r--fs/f2fs/checkpoint.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 85b7141f0d89..7dbd7f33d807 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -38,20 +38,20 @@ void f2fs_stop_checkpoint(struct f2fs_sb_info *sbi, bool end_io,
/*
* We guarantee no failure on the returned page.
*/
-struct page *f2fs_grab_meta_page(struct f2fs_sb_info *sbi, pgoff_t index)
+struct folio *f2fs_grab_meta_folio(struct f2fs_sb_info *sbi, pgoff_t index)
{
struct address_space *mapping = META_MAPPING(sbi);
- struct page *page;
+ struct folio *folio;
repeat:
- page = f2fs_grab_cache_page(mapping, index, false);
- if (!page) {
+ folio = f2fs_grab_cache_folio(mapping, index, false);
+ if (IS_ERR(folio)) {
cond_resched();
goto repeat;
}
- f2fs_wait_on_page_writeback(page, META, true, true);
- if (!PageUptodate(page))
- SetPageUptodate(page);
- return page;
+ f2fs_folio_wait_writeback(folio, META, true, true);
+ if (!folio_test_uptodate(folio))
+ folio_mark_uptodate(folio);
+ return folio;
}
static struct page *__get_meta_page(struct f2fs_sb_info *sbi, pgoff_t index,