[prev in list] [next in list] [prev in thread] [next in thread]
List: drbd-dev
Subject: [Drbd-dev] [PATCH 06/14] dm: pass the bio instead of tio to __map_bio
From: Christoph Hellwig <hch () lst ! de>
Date: 2022-01-27 6:35:38
Message-ID: 20220127063546.1314111-7-hch () lst ! de
[Download RAW message or body]
This simplifies the callers a bit.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/md/dm.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index f00c0582a2460..7cc477b2b77e9 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);
}
}
--
2.30.2
_______________________________________________
drbd-dev mailing list
drbd-dev@lists.linbit.com
https://lists.linbit.com/mailman/listinfo/drbd-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic