struct bio_set *bs = bio->bi_pool;
if (bip->bip_owns_buf)
- kfree(bip->bip_buf);
+ kfree(page_address(bip->bip_vec->bv_page) +
+ bip->bip_vec->bv_offset);
if (bs) {
if (bip->bip_slab != BIO_POOL_NONE)
struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
struct blk_integrity_exchg bix;
struct bio_vec *bv;
+ struct bio_integrity_payload *bip = bio_integrity(bio);
sector_t sector;
unsigned int sectors, ret = 0, i;
- void *prot_buf = bio_integrity(bio)->bip_buf;
+ void *prot_buf = page_address(bip->bip_vec->bv_page) +
+ bip->bip_vec->bv_offset;
if (operate)
sector = bio->bi_iter.bi_sector;
else
- sector = bio_integrity(bio)->bip_iter.bi_sector;
+ sector = bip->bip_iter.bi_sector;
bix.disk_name = bio->bi_bdev->bd_disk->disk_name;
bix.sector_size = bi->sector_size;
}
bip->bip_owns_buf = 1;
- bip->bip_buf = buf;
bip->bip_iter.bi_size = len;
bip->bip_iter.bi_sector = bio->bi_iter.bi_sector;
struct bvec_iter bip_iter;
- /* kill - should just use bip_vec */
- void *bip_buf; /* generated integrity data */
-
bio_end_io_t *bip_end_io; /* saved I/O completion fn */
unsigned short bip_slab; /* slab the bip came from */