diff options
| author | Bart Van Assche <bvanassche@acm.org> | 2026-06-10 22:34:19 +0300 |
|---|---|---|
| committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2026-06-22 22:52:37 +0300 |
| commit | bdc7cfd780c79228099674d419de93be25971ff9 (patch) | |
| tree | 788a33656c1bc60104727a337af9ad8e0a098a34 | |
| parent | 7ba36a9ea81c018c828138e8071c3658620e2f0f (diff) | |
| download | linux-bdc7cfd780c79228099674d419de93be25971ff9.tar.xz | |
f2fs: Split f2fs_write_end_io()
Prepare for running most of the write completion work asynchronously.
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/data.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 64250e6a94d1..a765fda71536 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -350,14 +350,11 @@ static void f2fs_read_end_io(struct bio *bio) f2fs_verify_and_finish_bio(bio, intask); } -static void f2fs_write_end_io(struct bio *bio) +static void f2fs_write_end_bio(struct bio *bio) { - struct f2fs_sb_info *sbi; + struct f2fs_sb_info *sbi = bio->bi_private; struct folio_iter fi; - iostat_update_and_unbind_ctx(bio); - sbi = bio->bi_private; - if (time_to_inject(sbi, FAULT_WRITE_IO)) bio->bi_status = BLK_STS_IOERR; @@ -414,6 +411,13 @@ static void f2fs_write_end_io(struct bio *bio) bio_put(bio); } +static void f2fs_write_end_io(struct bio *bio) +{ + iostat_update_and_unbind_ctx(bio); + + f2fs_write_end_bio(bio); +} + #ifdef CONFIG_BLK_DEV_ZONED static void f2fs_zone_write_end_io(struct bio *bio) { |
