From: Christoph Hellwig Date: Mon, 4 Apr 2022 04:45:28 +0000 (+0200) Subject: btrfs: stop using the btrfs_bio saved iter in index_rbio_pages X-Git-Tag: v5.19-rc1~174^2~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b027669449390ed549579f0a838c2de6a037dea6;p=thirdparty%2Fkernel%2Flinux.git btrfs: stop using the btrfs_bio saved iter in index_rbio_pages The bios added to ->bio_list are the original bios fed into btrfs_map_bio, which are never advanced. Just use the iter in the bio itself. Reviewed-by: Qu Wenruo Signed-off-by: Christoph Hellwig Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index ca53f07e27f06..79438cdd604ea 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -1134,9 +1134,6 @@ static void index_rbio_pages(struct btrfs_raid_bio *rbio) stripe_offset = start - rbio->bioc->raid_map[0]; page_index = stripe_offset >> PAGE_SHIFT; - if (bio_flagged(bio, BIO_CLONED)) - bio->bi_iter = btrfs_bio(bio)->iter; - bio_for_each_segment(bvec, bio, iter) { rbio->bio_pages[page_index + i] = bvec.bv_page; i++;