aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/dm.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.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.c')
-rw-r--r--drivers/md/dm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 7a1a83b58677..7cae8235fbe1 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -955,6 +955,11 @@ static void dm_io_complete(struct dm_io *io)
}
}
+static void dm_io_inc_pending(struct dm_io *io)
+{
+ atomic_inc(&io->io_count);
+}
+
/*
* Decrements the number of outstanding ios that a bio has been
* cloned into, completing the original io if necc.
@@ -978,7 +983,7 @@ static void dm_io_set_error(struct dm_io *io, blk_status_t error)
spin_unlock_irqrestore(&io->lock, flags);
}
-void dm_io_dec_pending(struct dm_io *io, blk_status_t error)
+static void dm_io_dec_pending(struct dm_io *io, blk_status_t error)
{
if (unlikely(error))
dm_io_set_error(io, error);