mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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:
parent
32825c45ff
commit
376a78abf5
1 changed files with 4 additions and 0 deletions
|
|
@ -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 a new issue