diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-03 17:05:24 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-12-03 17:05:24 -0500 |
| commit | 93bd38b31f5169a8f822de15a01abddd2fc8bcd7 (patch) | |
| tree | 34d0050d0fe96ac99ad6274f1f86eeff95cce6c9 | |
| parent | 46d967ae74ba4412b39f4df9b4fcbe0a766989f4 (diff) | |
| parent | 594416a72032684792bb22510c538098db10b750 (diff) | |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
Pull block core regression fix from Jens Axboe:
"Single fix for a regression introduced in this development cycle,
where dm on top of dif/dix is broken. From Darrick Wong"
* 'for-linus' of git://git.kernel.dk/linux-block:
block: fix regression where bio_integrity_process uses wrong bio_vec iterator
| -rw-r--r-- | block/bio-integrity.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c index 0984232e429f..5cbd5d9ea61d 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c | |||
| @@ -216,9 +216,10 @@ static int bio_integrity_process(struct bio *bio, | |||
| 216 | { | 216 | { |
| 217 | struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); | 217 | struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); |
| 218 | struct blk_integrity_iter iter; | 218 | struct blk_integrity_iter iter; |
| 219 | struct bio_vec *bv; | 219 | struct bvec_iter bviter; |
| 220 | struct bio_vec bv; | ||
| 220 | struct bio_integrity_payload *bip = bio_integrity(bio); | 221 | struct bio_integrity_payload *bip = bio_integrity(bio); |
| 221 | unsigned int i, ret = 0; | 222 | unsigned int ret = 0; |
| 222 | void *prot_buf = page_address(bip->bip_vec->bv_page) + | 223 | void *prot_buf = page_address(bip->bip_vec->bv_page) + |
| 223 | bip->bip_vec->bv_offset; | 224 | bip->bip_vec->bv_offset; |
| 224 | 225 | ||
| @@ -227,11 +228,11 @@ static int bio_integrity_process(struct bio *bio, | |||
| 227 | iter.seed = bip_get_seed(bip); | 228 | iter.seed = bip_get_seed(bip); |
| 228 | iter.prot_buf = prot_buf; | 229 | iter.prot_buf = prot_buf; |
| 229 | 230 | ||
| 230 | bio_for_each_segment_all(bv, bio, i) { | 231 | bio_for_each_segment(bv, bio, bviter) { |
| 231 | void *kaddr = kmap_atomic(bv->bv_page); | 232 | void *kaddr = kmap_atomic(bv.bv_page); |
| 232 | 233 | ||
| 233 | iter.data_buf = kaddr + bv->bv_offset; | 234 | iter.data_buf = kaddr + bv.bv_offset; |
| 234 | iter.data_size = bv->bv_len; | 235 | iter.data_size = bv.bv_len; |
| 235 | 236 | ||
| 236 | ret = proc_fn(&iter); | 237 | ret = proc_fn(&iter); |
| 237 | if (ret) { | 238 | if (ret) { |
