aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2014-09-26 19:19:58 -0400
committerJens Axboe <axboe@fb.com>2014-09-27 11:14:50 -0400
commit5f9378fa9ca214977b5bfc12197c67eea450fc40 (patch)
treef70421eac08925422a3124989450e4f8b8ebf6ce /block
parent8492b68bc4025e7bce1d57761bd7c047efda2f81 (diff)
block: Remove bip_buf
bip_buf is not really needed so we can remove it. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
-rw-r--r--block/bio-integrity.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 367bb24bb9f1..e84f7fb8694b 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -101,7 +101,8 @@ void bio_integrity_free(struct bio *bio)
101 struct bio_set *bs = bio->bi_pool; 101 struct bio_set *bs = bio->bi_pool;
102 102
103 if (bip->bip_owns_buf) 103 if (bip->bip_owns_buf)
104 kfree(bip->bip_buf); 104 kfree(page_address(bip->bip_vec->bv_page) +
105 bip->bip_vec->bv_offset);
105 106
106 if (bs) { 107 if (bs) {
107 if (bip->bip_slab != BIO_POOL_NONE) 108 if (bip->bip_slab != BIO_POOL_NONE)
@@ -219,14 +220,16 @@ static int bio_integrity_generate_verify(struct bio *bio, int operate)
219 struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); 220 struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
220 struct blk_integrity_exchg bix; 221 struct blk_integrity_exchg bix;
221 struct bio_vec *bv; 222 struct bio_vec *bv;
223 struct bio_integrity_payload *bip = bio_integrity(bio);
222 sector_t sector; 224 sector_t sector;
223 unsigned int sectors, ret = 0, i; 225 unsigned int sectors, ret = 0, i;
224 void *prot_buf = bio_integrity(bio)->bip_buf; 226 void *prot_buf = page_address(bip->bip_vec->bv_page) +
227 bip->bip_vec->bv_offset;
225 228
226 if (operate) 229 if (operate)
227 sector = bio->bi_iter.bi_sector; 230 sector = bio->bi_iter.bi_sector;
228 else 231 else
229 sector = bio_integrity(bio)->bip_iter.bi_sector; 232 sector = bip->bip_iter.bi_sector;
230 233
231 bix.disk_name = bio->bi_bdev->bd_disk->disk_name; 234 bix.disk_name = bio->bi_bdev->bd_disk->disk_name;
232 bix.sector_size = bi->sector_size; 235 bix.sector_size = bi->sector_size;
@@ -321,7 +324,6 @@ int bio_integrity_prep(struct bio *bio)
321 } 324 }
322 325
323 bip->bip_owns_buf = 1; 326 bip->bip_owns_buf = 1;
324 bip->bip_buf = buf;
325 bip->bip_iter.bi_size = len; 327 bip->bip_iter.bi_size = len;
326 bip->bip_iter.bi_sector = bio->bi_iter.bi_sector; 328 bip->bip_iter.bi_sector = bio->bi_iter.bi_sector;
327 329