Skip to content

Commit f414ca6

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
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()
2 parents 2f51c82 + 90d0f0f commit f414ca6

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

include/linux/bio.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,6 @@ static inline void bio_get_last_bvec(struct bio *bio, struct bio_vec *bv)
320320
struct bvec_iter iter = bio->bi_iter;
321321
int idx;
322322

323-
if (!bio_flagged(bio, BIO_CLONED)) {
324-
*bv = bio->bi_io_vec[bio->bi_vcnt - 1];
325-
return;
326-
}
327-
328323
if (unlikely(!bio_multiple_segments(bio))) {
329324
*bv = bio_iovec(bio);
330325
return;

0 commit comments

Comments
 (0)