dm integrity: do not check integrity for failed read operations

Even though read operations fail, dm_integrity_map_continue() calls
integrity_metadata() to check integrity. In this case, just complete
these.

This also makes it so read I/O errors do not generate integrity warnings
in the kernel log.

Cc: stable@vger.kernel.org
Signed-off-by: Hyunchul Lee <cheol.lee@lge.com>
Acked-by: Milan Broz <gmazyland@gmail.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>

authored by

Hyunchul Lee and committed by
Mike Snitzer
b7e326f7 228bb5b2

+5 -1
+5 -1
drivers/md/dm-integrity.c
··· 1702 1702 1703 1703 if (need_sync_io) { 1704 1704 wait_for_completion_io(&read_comp); 1705 - integrity_metadata(&dio->work); 1705 + if (likely(!bio->bi_status)) 1706 + integrity_metadata(&dio->work); 1707 + else 1708 + dec_in_flight(dio); 1709 + 1706 1710 } else { 1707 1711 INIT_WORK(&dio->work, integrity_metadata); 1708 1712 queue_work(ic->metadata_wq, &dio->work);