]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
bio-integrity: only verify integrity on the lowest stacked driver
authorChristoph Hellwig <hch@lst.de>
Wed, 9 Aug 2017 15:47:27 +0000 (17:47 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 10 Aug 2017 02:24:36 +0000 (20:24 -0600)
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>
block/bio-integrity.c

index 0fd9604974da903089f7d5ac8f01ce876c097a08..9b1ea478577b033195f34b457c85ad16eb759c6a 100644 (file)
@@ -388,11 +388,10 @@ static void bio_integrity_verify_fn(struct work_struct *work)
 bool __bio_integrity_endio(struct bio *bio)
 {
        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 &&
-           bi->profile->verify_fn) {
-               struct bio_integrity_payload *bip = bio_integrity(bio);
-
+           (bip->bip_flags & BIP_BLOCK_INTEGRITY) && bi->profile->verify_fn) {
                INIT_WORK(&bip->bip_work, bio_integrity_verify_fn);
                queue_work(kintegrityd_wq, &bip->bip_work);
                return false;