diff --git a/block/bio-integrity.c b/block/bio-integrity.c index fc71e61728696b2560c389cc7f75e49ea34daa0a..553d75e357b4a456fd7524edf46a23711f161a7c 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c @@ -385,7 +385,10 @@ static void bio_integrity_verify_fn(struct work_struct *work) */ bool __bio_integrity_endio(struct bio *bio) { - if (bio_op(bio) == REQ_OP_READ && !bio->bi_status) { + struct blk_integrity *bi = blk_get_integrity(bio->bi_disk); + + if (bio_op(bio) == REQ_OP_READ && !bio->bi_status && + bi->profile->verify_fn) { struct bio_integrity_payload *bip = bio_integrity(bio); INIT_WORK(&bip->bip_work, bio_integrity_verify_fn);