]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: stop using the btrfs_bio saved iter in index_rbio_pages
authorChristoph Hellwig <hch@lst.de>
Mon, 4 Apr 2022 04:45:28 +0000 (06:45 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:12 +0000 (17:03 +0200)
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 <wqu@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c

index ca53f07e27f06f25f6f3613c1925beec7605bcf0..79438cdd604ea779b4a749e35101ef1ac476774a 100644 (file)
@@ -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++;