summaryrefslogtreecommitdiff
path: root/drivers/md/dm-zone.c
diff options
context:
space:
mode:
authorMing Lei <ming.lei@redhat.com>2022-04-12 16:56:14 +0800
committerMike Snitzer <snitzer@kernel.org>2022-05-05 17:31:36 -0400
commit2e803cd99ba8b7a84be155c1d5ee28d363fdbe44 (patch)
tree2255fec7acdf7812b8b30c16928afca2ac4286a7 /drivers/md/dm-zone.c
parent7dd76d1feec70a23e1de2b55c0c2a9c592fa8423 (diff)
dm: don't grab target io reference in dm_zone_map_bio
dm_zone_map_bio() is only called from __map_bio in which the io's reference is grabbed already, and the reference won't be released until the bio is submitted, so not necessary to do it dm_zone_map_bio any more. Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Tested-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md/dm-zone.c')
-rw-r--r--drivers/md/dm-zone.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/md/dm-zone.c b/drivers/md/dm-zone.c
index 57daa86c19cf..3e7b1fe1580b 100644
--- a/drivers/md/dm-zone.c
+++ b/drivers/md/dm-zone.c
@@ -550,13 +550,6 @@ int dm_zone_map_bio(struct dm_target_io *tio)
return DM_MAPIO_KILL;
}
- /*
- * The target map function may issue and complete the IO quickly.
- * Take an extra reference on the IO to make sure it does disappear
- * until we run dm_zone_map_bio_end().
- */
- dm_io_inc_pending(io);
-
/* Let the target do its work */
r = ti->type->map(ti, clone);
switch (r) {
@@ -587,9 +580,6 @@ int dm_zone_map_bio(struct dm_target_io *tio)
break;
}
- /* Drop the extra reference on the IO */
- dm_io_dec_pending(io, sts);
-
if (sts != BLK_STS_OK)
return DM_MAPIO_KILL;