diff options
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 1499b27b4186..eac6784e43d7 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c | |||
@@ -201,18 +201,16 @@ csum_failed: | |||
201 | if (cb->errors) { | 201 | if (cb->errors) { |
202 | bio_io_error(cb->orig_bio); | 202 | bio_io_error(cb->orig_bio); |
203 | } else { | 203 | } else { |
204 | int bio_index = 0; | 204 | int i; |
205 | struct bio_vec *bvec = cb->orig_bio->bi_io_vec; | 205 | struct bio_vec *bvec; |
206 | 206 | ||
207 | /* | 207 | /* |
208 | * we have verified the checksum already, set page | 208 | * we have verified the checksum already, set page |
209 | * checked so the end_io handlers know about it | 209 | * checked so the end_io handlers know about it |
210 | */ | 210 | */ |
211 | while (bio_index < cb->orig_bio->bi_vcnt) { | 211 | bio_for_each_segment_all(bvec, cb->orig_bio, i) |
212 | SetPageChecked(bvec->bv_page); | 212 | SetPageChecked(bvec->bv_page); |
213 | bvec++; | 213 | |
214 | bio_index++; | ||
215 | } | ||
216 | bio_endio(cb->orig_bio, 0); | 214 | bio_endio(cb->orig_bio, 0); |
217 | } | 215 | } |
218 | 216 | ||