mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
bio-integrity: bio_trim should truncate integrity vector accordingly
Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
32825c45ff
commit
376a78abf5
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user