History

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()

Linus Torvalds committed 10 years ago

Commit f414ca62 parents 2f51c82 90d0f0f1 file · +0 −5Browse files

Unified · Split

include/linux/bio.h+0−5
@@ -320,11 +320,6 @@ static inline void bio_get_last_bvec(struct bio *bio, struct bio_vec *bv) · 319 unmodified lines
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;