From: Nicholas Bellinger Date: Wed, 22 Jan 2014 04:32:05 +0000 (-0800) Subject: bio-integrity: Fix bio_integrity_verify segment start bug X-Git-Tag: v3.14-rc1~43^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5837c80e870b;p=pandora-kernel.git bio-integrity: Fix bio_integrity_verify segment start bug This patch addresses a bug in bio_integrity_verify() code that has been causing DIF READ verify operations to be silently skipped. The issue is that bio->bi_idx will have been incremented within bio_advance() code in the normal blk_update_request() -> req_bio_endio() completion path, and bio_integrity_verify() is using bio_for_each_segment() which starts the bio segment walk at the current bio->bi_idx. So instead use bio_for_each_segment_all() to always start the bio segment walk from zero, regardless of the current bio->bi_idx value after bio_advance() has been called. Cc: Martin K. Petersen Cc: Jens Axboe Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger Cc: stable@kernel.dk # >= v3.10 Signed-off-by: Jens Axboe --- Reading git-diff-tree failed