Commit f86e28c4 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

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: default avatarChristoph Hellwig <hch@lst.de>
Fixes: 7c20f116 ("bio-integrity: stop abusing bi_end_io")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c775d209
...@@ -388,11 +388,10 @@ static void bio_integrity_verify_fn(struct work_struct *work) ...@@ -388,11 +388,10 @@ static void bio_integrity_verify_fn(struct work_struct *work)
bool __bio_integrity_endio(struct bio *bio) bool __bio_integrity_endio(struct bio *bio)
{ {
struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
struct bio_integrity_payload *bip = bio_integrity(bio);
if (bio_op(bio) == REQ_OP_READ && !bio->bi_status && if (bio_op(bio) == REQ_OP_READ && !bio->bi_status &&
bi->profile->verify_fn) { (bip->bip_flags & BIP_BLOCK_INTEGRITY) && bi->profile->verify_fn) {
struct bio_integrity_payload *bip = bio_integrity(bio);
INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); INIT_WORK(&bip->bip_work, bio_integrity_verify_fn);
queue_work(kintegrityd_wq, &bip->bip_work); queue_work(kintegrityd_wq, &bip->bip_work);
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment