diff options
-rw-r--r-- | block/bio-integrity.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/bio-integrity.c b/block/bio-integrity.c index 83e92beb3c9f..0fd9604974da 100644 --- a/block/bio-integrity.c +++ b/block/bio-integrity.c | |||
@@ -387,7 +387,10 @@ static void bio_integrity_verify_fn(struct work_struct *work) | |||
387 | */ | 387 | */ |
388 | bool __bio_integrity_endio(struct bio *bio) | 388 | bool __bio_integrity_endio(struct bio *bio) |
389 | { | 389 | { |
390 | if (bio_op(bio) == REQ_OP_READ && !bio->bi_status) { | 390 | struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev); |
391 | |||
392 | if (bio_op(bio) == REQ_OP_READ && !bio->bi_status && | ||
393 | bi->profile->verify_fn) { | ||
391 | struct bio_integrity_payload *bip = bio_integrity(bio); | 394 | struct bio_integrity_payload *bip = bio_integrity(bio); |
392 | 395 | ||
393 | INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); | 396 | INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); |