Commit 376a78ab authored by Dmitry Monakhov's avatar Dmitry Monakhov Committed by Jens Axboe

bio-integrity: bio_trim should truncate integrity vector accordingly

Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 32825c45
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment