diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2014-09-26 19:20:04 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-09-27 11:14:54 -0400 |
commit | b1f01388574c9329922f760fc2a7335c2d14b08b (patch) | |
tree | e7c3715508c780745026678266c9e7718fa0be32 /block | |
parent | 3aec2f41a8baeb70aa77556a4e4dcec7d9d70b4d (diff) |
block: Relocate bio integrity flags
Move flags affecting the integrity code out of the bio bi_flags and into
the block integrity payload.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c index e64733bb29b6..26aa901b961f 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c | |||
@@ -100,7 +100,7 @@ void bio_integrity_free(struct bio *bio) | |||
100 | struct bio_integrity_payload *bip = bio_integrity(bio); | 100 | struct bio_integrity_payload *bip = bio_integrity(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_flags & BIP_BLOCK_INTEGRITY) |
104 | kfree(page_address(bip->bip_vec->bv_page) + | 104 | kfree(page_address(bip->bip_vec->bv_page) + |
105 | bip->bip_vec->bv_offset); | 105 | bip->bip_vec->bv_offset); |
106 | 106 | ||
@@ -293,7 +293,7 @@ int bio_integrity_prep(struct bio *bio) | |||
293 | return -EIO; | 293 | return -EIO; |
294 | } | 294 | } |
295 | 295 | ||
296 | bip->bip_owns_buf = 1; | 296 | bip->bip_flags |= BIP_BLOCK_INTEGRITY; |
297 | bip->bip_iter.bi_size = len; | 297 | bip->bip_iter.bi_size = len; |
298 | bip_set_seed(bip, bio->bi_iter.bi_sector); | 298 | bip_set_seed(bip, bio->bi_iter.bi_sector); |
299 | 299 | ||