Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7e326f7 authored by Hyunchul Lee's avatar Hyunchul Lee Committed by Mike Snitzer
Browse files

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: default avatarHyunchul Lee <cheol.lee@lge.com>
Acked-by: default avatarMilan Broz <gmazyland@gmail.com>
Acked-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 228bb5b2
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1702,7 +1702,11 @@ static void dm_integrity_map_continue(struct dm_integrity_io *dio, bool from_map

	if (need_sync_io) {
		wait_for_completion_io(&read_comp);
		if (likely(!bio->bi_status))
			integrity_metadata(&dio->work);
		else
			dec_in_flight(dio);

	} else {
		INIT_WORK(&dio->work, integrity_metadata);
		queue_work(ic->metadata_wq, &dio->work);