summaryrefslogtreecommitdiff
path: root/block/bio.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2017-06-29 21:31:10 +0300
committerJens Axboe <axboe@kernel.dk>2017-07-04 01:56:22 +0300
commitfbd08e7673f950854679e5d79a30bb25e77a9d08 (patch)
tree7539736c05c4cec5f456b4e41c88d150b7d3353e /block/bio.c
parent309a62fa3a9e78cb37a620913151cbb47d83b81d (diff)
downloadlinux-fbd08e7673f950854679e5d79a30bb25e77a9d08.tar.xz
bio-integrity: fix interface for bio_integrity_trim
bio_integrity_trim inherent it's interface from bio_trim and accept offset and size, but this API is error prone because data offset must always be insync with bio's data offset. That is why we have integrity update hook in bio_advance() So only meaningful values are: offset == 0, sectors == bio_sectors(bio) Let's just remove them completely. Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Christoph Hellwig <hch@lst.de> 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>
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/bio.c b/block/bio.c
index 5b4b32a2f8d0..a6b225324a61 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1868,7 +1868,7 @@ struct bio *bio_split(struct bio *bio, int sectors,
split->bi_iter.bi_size = sectors << 9;
if (bio_integrity(split))
- bio_integrity_trim(split, 0, sectors);
+ bio_integrity_trim(split);
bio_advance(bio, split->bi_iter.bi_size);
@@ -1902,7 +1902,7 @@ void bio_trim(struct bio *bio, int offset, int size)
bio->bi_iter.bi_size = size;
if (bio_integrity(bio))
- bio_integrity_trim(bio, 0, size);
+ bio_integrity_trim(bio);
}
EXPORT_SYMBOL_GPL(bio_trim);