Pull block merge fix from Jens Axboe. This fixes the block segment counting bug and resulting sg overrun reported by Kent Overstreet, introduced with the last block pull. * 'for-linus' of git://git.kernel.dk/linux-block: block: don't optimize for non-cloned bio in bio_get_last_bvec()
Unified · Split
| @@ -320,11 +320,6 @@ static inline void bio_get_last_bvec(struct bio *bio, struct bio_vec *bv) · 319 unmodified lines | ||
| 320 | 320 | struct bvec_iter iter = bio->bi_iter; |
| 321 | 321 | int idx; |
| 322 | 322 | |
| 323 | − if (!bio_flagged(bio, BIO_CLONED)) { | |
| 324 | − *bv = bio->bi_io_vec[bio->bi_vcnt - 1]; | |
| 325 | − return; | |
| 326 | − } | |
| 327 | − | |
| 328 | 323 | if (unlikely(!bio_multiple_segments(bio))) { |
| 329 | 324 | *bv = bio_iovec(bio); |
| 330 | 325 | return; |