summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorDmitry Monakhov <dmonakhov@openvz.org>2017-06-29 20:31:10 +0200
committerJens Axboe <axboe@kernel.dk>2017-07-04 00:56:22 +0200
commitfbd08e7673f950854679e5d79a30bb25e77a9d08 (patch)
tree7539736c05c4cec5f456b4e41c88d150b7d3353e /drivers/md/dm.c
parentbio-integrity: bio_integrity_advance must update integrity seed (diff)
downloadlinux-fbd08e7673f950854679e5d79a30bb25e77a9d08.tar.xz
linux-fbd08e7673f950854679e5d79a30bb25e77a9d08.zip
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 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 402946035308..13e714ea7a42 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1153,7 +1153,7 @@ static int clone_bio(struct dm_target_io *tio, struct bio *bio,
clone->bi_iter.bi_size = to_bytes(len);
if (unlikely(bio_integrity(bio) != NULL))
- bio_integrity_trim(clone, 0, len);
+ bio_integrity_trim(clone);
return 0;
}