aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-08-09 11:47:27 -0400
committerJens Axboe <axboe@kernel.dk>2017-08-09 22:24:36 -0400
commitf86e28c4dc8d475cb82ca8d018daaa1564534aad (patch)
tree1e967aba87ed8f786ddd7f8e65b2a4173bf702e7
parentc775d2098d35bd130a883bbdf6af9401a8c4cb2d (diff)
bio-integrity: only verify integrity on the lowest stacked driver
This gets us back to the behavior in 4.12 and earlier. Signed-off-by: Christoph Hellwig <hch@lst.de> Fixes: 7c20f116 ("bio-integrity: stop abusing bi_end_io") Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--block/bio-integrity.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 0fd9604974da..9b1ea478577b 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -388,11 +388,10 @@ static void bio_integrity_verify_fn(struct work_struct *work)
388bool __bio_integrity_endio(struct bio *bio) 388bool __bio_integrity_endio(struct bio *bio)
389{ 389{
390 struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); 390 struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
391 struct bio_integrity_payload *bip = bio_integrity(bio);
391 392
392 if (bio_op(bio) == REQ_OP_READ && !bio->bi_status && 393 if (bio_op(bio) == REQ_OP_READ && !bio->bi_status &&
393 bi->profile->verify_fn) { 394 (bip->bip_flags & BIP_BLOCK_INTEGRITY) && bi->profile->verify_fn) {
394 struct bio_integrity_payload *bip = bio_integrity(bio);
395
396 INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); 395 INIT_WORK(&bip->bip_work, bio_integrity_verify_fn);
397 queue_work(kintegrityd_wq, &bip->bip_work); 396 queue_work(kintegrityd_wq, &bip->bip_work);
398 return false; 397 return false;