bio-integrity: bio_trim should truncate integrity vector accordingly

Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Martin K. Petersen <[email protected]>
Signed-off-by: Dmitry Monakhov <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Dmitry Monakhov 2017-06-29 11:31:08 -07:00 • committed by Jens Axboe
commit 376a78abf5

View file

@ -1900,6 +1900,10 @@ void bio_trim(struct bio *bio, int offset, int size)
bio_advance(bio, offset << 9);
bio->bi_iter.bi_size = size;
if (bio_integrity(bio))
bio_integrity_trim(bio, 0, size);
}
EXPORT_SYMBOL_GPL(bio_trim);