[Devel] [PATCH RHEL8 COMMIT] ploop: Convert dec_nr_inflight()
Konstantin Khorenko
khorenko at virtuozzo.com
Mon May 17 19:04:50 MSK 2021
The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.30
------>
commit 7d964959fc070b02f0fac824a5548e8c9310f674
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon May 17 19:04:50 2021 +0300
ploop: Convert dec_nr_inflight()
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
=====================
Patchset description:
dm-ploop: Kill loop
Intermediate patches can't be base for bisect.
In scope of https://jira.sw.ru/browse/PSBM-123654
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/md/dm-ploop-map.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index d30c055c2d50..057633854049 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -290,11 +290,9 @@ static void dec_nr_inflight_raw(struct ploop *ploop, struct pio *h)
}
}
-static void dec_nr_inflight(struct ploop *ploop, struct bio *bio)
+static void dec_nr_inflight(struct ploop *ploop, struct pio *pio)
{
- struct pio *h = bio_to_endio_hook(bio);
-
- dec_nr_inflight_raw(ploop, h);
+ dec_nr_inflight_raw(ploop, pio);
}
static void link_endio_hook(struct ploop *ploop, struct pio *new, struct rb_root *root,
@@ -503,7 +501,7 @@ static int ploop_discard_bio_end(struct ploop *ploop, struct bio *bio)
{
struct pio *h = bio_to_endio_hook(bio);
- dec_nr_inflight(ploop, bio);
+ dec_nr_inflight(ploop, h);
if (bio->bi_status == BLK_STS_OK)
queue_discard_index_wb(ploop, h);
else
@@ -863,7 +861,7 @@ static int ploop_data_bio_end(struct bio *bio)
bio->bi_status = piwb->bi_status;
spin_unlock_irqrestore(&piwb->lock, flags);
- dec_nr_inflight(piwb->ploop, bio);
+ dec_nr_inflight(piwb->ploop, pio);
if (!completed)
return DM_ENDIO_INCOMPLETE;
@@ -1704,7 +1702,7 @@ int ploop_endio(struct dm_target *ti, struct bio *bio, blk_status_t *err)
if (ret == DM_ENDIO_DONE) {
maybe_unlink_completed_bio(ploop, bio);
- dec_nr_inflight(ploop, bio);
+ dec_nr_inflight(ploop, h);
}
return ret;
More information about the Devel
mailing list