diff options
author | Dmitry Monakhov <dmonakhov@openvz.org> | 2017-06-29 11:31:08 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-07-03 16:56:19 -0600 |
commit | 376a78abf5cc721a86ed42a1a24044d35fb8d2a8 (patch) | |
tree | 80282f626b0d0273baac32665451dbdea32568cf | |
parent | 32825c45ff8f4cce937ab85b030dc693ceb1aa0a (diff) | |
download | op-kernel-dev-376a78abf5cc721a86ed42a1a24044d35fb8d2a8.zip op-kernel-dev-376a78abf5cc721a86ed42a1a24044d35fb8d2a8.tar.gz |
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>
-rw-r--r-- | block/bio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/bio.c b/block/bio.c index 1cfcd0d..5b4b32a 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); |