diff --git a/block/bio.c b/block/bio.c index 1cfcd0df3f30f7635d2ca5ac27e356196d56646f..5b4b32a2f8d0e36f3ef3168dd2c41b52770f29e5 100644 --- a/block/bio.c +++ b/block/bio.c @@ -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);