Skip to content

Commit a9249a2

Browse files
Matthew Wilcox (Oracle)Jaegeuk Kim
authored andcommitted
f2fs: Use a folio iterator in f2fs_handle_step_decompress()
Change from bio_for_each_segment_all() to bio_for_each_folio_all() to iterate over each folio instead of each page. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent d6966e7 commit a9249a2

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

fs/f2fs/data.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,16 +233,15 @@ static void f2fs_verify_and_finish_bio(struct bio *bio, bool in_task)
233233
static void f2fs_handle_step_decompress(struct bio_post_read_ctx *ctx,
234234
bool in_task)
235235
{
236-
struct bio_vec *bv;
237-
struct bvec_iter_all iter_all;
236+
struct folio_iter fi;
238237
bool all_compressed = true;
239238
block_t blkaddr = ctx->fs_blkaddr;
240239

241-
bio_for_each_segment_all(bv, ctx->bio, iter_all) {
242-
struct page *page = bv->bv_page;
240+
bio_for_each_folio_all(fi, ctx->bio) {
241+
struct folio *folio = fi.folio;
243242

244-
if (f2fs_is_compressed_page(page))
245-
f2fs_end_read_compressed_page(page, false, blkaddr,
243+
if (f2fs_is_compressed_page(&folio->page))
244+
f2fs_end_read_compressed_page(&folio->page, false, blkaddr,
246245
in_task);
247246
else
248247
all_compressed = false;

0 commit comments

Comments
 (0)