summaryrefslogtreecommitdiff
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-02-02 19:01:02 +0300
committerJens Axboe <axboe@kernel.dk>2022-02-04 17:43:17 +0300
commit1561b396106d759fdf5f9a71b412e068f74d2cc9 (patch)
tree0c3d94ba473eaa483512a0fd1faea5702b7a088f /drivers/md/dm.c
parentdc8e2021da71f6b2d5971f98ee3e528cf30c409c (diff)
downloadlinux-1561b396106d759fdf5f9a71b412e068f74d2cc9.tar.xz
dm: pass the bio instead of tio to __map_bio
This simplifies the callers a bit. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Link: https://lore.kernel.org/r/20220202160109.108149-7-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 90341b7fa580..a43d280e9bc5 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1117,11 +1117,11 @@ static noinline void __set_swap_bios_limit(struct mapped_device *md, int latch)
mutex_unlock(&md->swap_bios_lock);
}
-static void __map_bio(struct dm_target_io *tio)
+static void __map_bio(struct bio *clone)
{
+ struct dm_target_io *tio = clone_to_tio(clone);
int r;
sector_t sector;
- struct bio *clone = &tio->clone;
struct dm_io *io = tio->io;
struct dm_target *ti = tio->ti;
@@ -1227,7 +1227,7 @@ static int __clone_and_map_data_bio(struct clone_info *ci, struct dm_target *ti,
if (bio_integrity(bio))
bio_integrity_trim(clone);
- __map_bio(tio);
+ __map_bio(clone);
return 0;
free_tio:
free_tio(tio);
@@ -1283,11 +1283,9 @@ static void __send_duplicate_bios(struct clone_info *ci, struct dm_target *ti,
alloc_multiple_bios(&blist, ci, ti, num_bios, len);
while ((clone = bio_list_pop(&blist))) {
- struct dm_target_io *tio = clone_to_tio(clone);
-
if (len)
bio_setup_sector(clone, ci->sector, *len);
- __map_bio(tio);
+ __map_bio(clone);
}
}