summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2025-03-31 21:10:34 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2025-04-28 15:22:44 +0000
commitb629c6480ece59d96ae0bc2647bccff58f542be4 (patch)
treef02e3bcf4a7bfa3a8cf4e8dd3584324e8b8fb1e7
parent46fd261c677e65df36564997f7a5227f3e352de9 (diff)
f2fs: Pass a folio to f2fs_submit_merged_ipu_write()
The only caller which passes a page already has a folio, so pass it in. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/data.c8
-rw-r--r--fs/f2fs/f2fs.h2
-rw-r--r--fs/f2fs/segment.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 2e901403000d..dfe4ce31105c 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -826,13 +826,13 @@ static int add_ipu_page(struct f2fs_io_info *fio, struct bio **bio,
}
void f2fs_submit_merged_ipu_write(struct f2fs_sb_info *sbi,
- struct bio **bio, struct page *page)
+ struct bio **bio, struct folio *folio)
{
enum temp_type temp;
bool found = false;
struct bio *target = bio ? *bio : NULL;
- f2fs_bug_on(sbi, !target && !page);
+ f2fs_bug_on(sbi, !target && !folio);
for (temp = HOT; temp < NR_TEMP_TYPE && !found; temp++) {
struct f2fs_bio_info *io = sbi->write_io[DATA] + temp;
@@ -848,7 +848,7 @@ void f2fs_submit_merged_ipu_write(struct f2fs_sb_info *sbi,
found = (target == be->bio);
else
found = __has_merged_page(be->bio, NULL,
- page, 0);
+ &folio->page, 0);
if (found)
break;
}
@@ -865,7 +865,7 @@ void f2fs_submit_merged_ipu_write(struct f2fs_sb_info *sbi,
found = (target == be->bio);
else
found = __has_merged_page(be->bio, NULL,
- page, 0);
+ &folio->page, 0);
if (found) {
target = be->bio;
del_bio_entry(be);
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 394343518dcf..7960a2f4a1e4 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3958,7 +3958,7 @@ void f2fs_submit_merged_write_cond(struct f2fs_sb_info *sbi,
struct inode *inode, struct page *page,
nid_t ino, enum page_type type);
void f2fs_submit_merged_ipu_write(struct f2fs_sb_info *sbi,
- struct bio **bio, struct page *page);
+ struct bio **bio, struct folio *folio);
void f2fs_flush_merged_writes(struct f2fs_sb_info *sbi);
int f2fs_submit_page_bio(struct f2fs_io_info *fio);
int f2fs_merge_page_bio(struct f2fs_io_info *fio);
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index dcbc38c5c140..76e6fce82fa1 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -4171,7 +4171,7 @@ void f2fs_folio_wait_writeback(struct folio *folio, enum page_type type,
/* submit cached LFS IO */
f2fs_submit_merged_write_cond(sbi, NULL, &folio->page, 0, type);
/* submit cached IPU IO */
- f2fs_submit_merged_ipu_write(sbi, NULL, &folio->page);
+ f2fs_submit_merged_ipu_write(sbi, NULL, folio);
if (ordered) {
folio_wait_writeback(folio);
f2fs_bug_on(sbi, locked && folio_test_writeback(folio));