Skip to content

Commit cabda16

Browse files
Matthew Wilcox (Oracle)Jaegeuk Kim
authored andcommitted
f2fs: Use a folio iterator in f2fs_verify_bio()
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) <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 587b2df commit cabda16

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

fs/f2fs/data.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,13 @@ static void f2fs_verify_bio(struct work_struct *work)
181181
* as those were handled separately by f2fs_end_read_compressed_page().
182182
*/
183183
if (may_have_compressed_pages) {
184-
struct bio_vec *bv;
185-
struct bvec_iter_all iter_all;
184+
struct folio_iter fi;
186185

187-
bio_for_each_segment_all(bv, bio, iter_all) {
188-
struct page *page = bv->bv_page;
186+
bio_for_each_folio_all(fi, bio) {
187+
struct folio *folio = fi.folio;
189188

190-
if (!f2fs_is_compressed_page(page) &&
191-
!fsverity_verify_page(page)) {
189+
if (!f2fs_is_compressed_page(&folio->page) &&
190+
!fsverity_verify_page(&folio->page)) {
192191
bio->bi_status = BLK_STS_IOERR;
193192
break;
194193
}

0 commit comments

Comments
 (0)